diff options
author | Joe Crayne <joe@jerkface.net> | 2018-12-10 13:37:42 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2018-12-16 14:08:26 -0500 |
commit | 2a9f75cbde498f69d1522caedda27dbfc2207bef (patch) | |
tree | b221ec07cccfeb574cd9ebf2daa1e483aace7ba6 /src/Network/Tox/TCP.hs | |
parent | 790ec8072f856247c0566b263ee9901bd1cde638 (diff) |
Fixed addresses in onion-wrapping for TCP getNodes.
Diffstat (limited to 'src/Network/Tox/TCP.hs')
-rw-r--r-- | src/Network/Tox/TCP.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Network/Tox/TCP.hs b/src/Network/Tox/TCP.hs index 353b5ea3..48059108 100644 --- a/src/Network/Tox/TCP.hs +++ b/src/Network/Tox/TCP.hs | |||
@@ -203,10 +203,10 @@ getUDPNodes tcp seeking dst = do | |||
203 | let meth = MethodSerializer -- MethodSerializer Nonce8 NodeInfo RelayPacket meth AnnounceRequest (Either String AnnounceResponse) | 203 | let meth = MethodSerializer -- MethodSerializer Nonce8 NodeInfo RelayPacket meth AnnounceRequest (Either String AnnounceResponse) |
204 | { methodTimeout = \tid addr -> return (addr,8000000) -- 8 second timeout | 204 | { methodTimeout = \tid addr -> return (addr,8000000) -- 8 second timeout |
205 | , method = () -- meth | 205 | , method = () -- meth |
206 | , wrapQuery = \n8 src dst x -> | 206 | , wrapQuery = \n8 src gateway x -> |
207 | OnionPacket n24 $ Addressed (UDP.nodeAddr $ udpNodeInfo dst) | 207 | OnionPacket n24 $ Addressed (UDP.nodeAddr dst) |
208 | $ wrapOnionPure b (wrap2 n24) (UDP.nodeAddr $ udpNodeInfo dst) | 208 | $ wrapOnionPure b (wrap2 n24) (nodeAddr gateway) |
209 | $ wrapOnionPure c (wrap1 n24) (nodeAddr gateway) | 209 | $ wrapOnionPure c (wrap1 n24) (UDP.nodeAddr dst) |
210 | $ NotForwarded $ encryptPayload (wrap0 n24) | 210 | $ NotForwarded $ encryptPayload (wrap0 n24) |
211 | $ OnionAnnounce Asymm | 211 | $ OnionAnnounce Asymm |
212 | { senderKey = transportPublic (tcpCrypto tcp) | 212 | { senderKey = transportPublic (tcpCrypto tcp) |