summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT/Session.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-01-03 23:58:37 -0500
committerjoe <joe@jerkface.net>2017-01-03 23:58:37 -0500
commiteb774b28dc02d1a5c0ad9c8178b1df3c0782b6eb (patch)
treebcb7a2fc2575ef8f352f2ad09033c6e62e7cfc4c /src/Network/BitTorrent/DHT/Session.hs
parent59f2763351ef1e3ba21f77e2273f3c523ac9df9d (diff)
Don't use BEP 43 read-only nodes for routing.
Diffstat (limited to 'src/Network/BitTorrent/DHT/Session.hs')
-rw-r--r--src/Network/BitTorrent/DHT/Session.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/DHT/Session.hs b/src/Network/BitTorrent/DHT/Session.hs
index 42270ae8..ffce47de 100644
--- a/src/Network/BitTorrent/DHT/Session.hs
+++ b/src/Network/BitTorrent/DHT/Session.hs
@@ -492,7 +492,8 @@ queryNode :: forall a b ip. Address ip => KRPC (Query a) (Response b)
492 => NodeAddr ip -> a -> DHT ip (NodeId, b) 492 => NodeAddr ip -> a -> DHT ip (NodeId, b)
493queryNode addr q = do 493queryNode addr q = do
494 nid <- asks thisNodeId 494 nid <- asks thisNodeId
495 Response remoteId r <- query (toSockAddr addr) (Query nid q) 495 let read_only = False -- TODO: check for NAT issues. (BEP 43)
496 Response remoteId r <- query (toSockAddr addr) (Query nid read_only q)
496 insertNode (NodeInfo remoteId addr) 497 insertNode (NodeInfo remoteId addr)
497 return (remoteId, r) 498 return (remoteId, r)
498 499