From 2a9f75cbde498f69d1522caedda27dbfc2207bef Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Mon, 10 Dec 2018 13:37:42 -0500 Subject: Fixed addresses in onion-wrapping for TCP getNodes. --- src/Network/Tox/TCP.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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 let meth = MethodSerializer -- MethodSerializer Nonce8 NodeInfo RelayPacket meth AnnounceRequest (Either String AnnounceResponse) { methodTimeout = \tid addr -> return (addr,8000000) -- 8 second timeout , method = () -- meth - , wrapQuery = \n8 src dst x -> - OnionPacket n24 $ Addressed (UDP.nodeAddr $ udpNodeInfo dst) - $ wrapOnionPure b (wrap2 n24) (UDP.nodeAddr $ udpNodeInfo dst) - $ wrapOnionPure c (wrap1 n24) (nodeAddr gateway) + , wrapQuery = \n8 src gateway x -> + OnionPacket n24 $ Addressed (UDP.nodeAddr dst) + $ wrapOnionPure b (wrap2 n24) (nodeAddr gateway) + $ wrapOnionPure c (wrap1 n24) (UDP.nodeAddr dst) $ NotForwarded $ encryptPayload (wrap0 n24) $ OnionAnnounce Asymm { senderKey = transportPublic (tcpCrypto tcp) -- cgit v1.2.3