diff options
author | joe <joe@jerkface.net> | 2017-11-02 21:24:34 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-11-02 21:24:34 -0400 |
commit | b514e562e0d77b9adb8ca5c75289204013de2968 (patch) | |
tree | 07c3ec90614f9a51bf822f2d6bca1c11da2e5f56 /src/Network/Tox/Onion/Transport.hs | |
parent | 30748b9edd4eb8df8998e29f68dfedb218ff8e8c (diff) |
Fixed onion routes for IPv4-mapped IPv6 addresses.
Diffstat (limited to 'src/Network/Tox/Onion/Transport.hs')
-rw-r--r-- | src/Network/Tox/Onion/Transport.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Network/Tox/Onion/Transport.hs b/src/Network/Tox/Onion/Transport.hs index baadbbe8..39ea8c46 100644 --- a/src/Network/Tox/Onion/Transport.hs +++ b/src/Network/Tox/Onion/Transport.hs | |||
@@ -246,9 +246,10 @@ encodeOnionAddr getRoute (msg,OnionDestination _ ni (Just rid)) = do | |||
246 | return ( runPut $ putRequest $ wrapForRoute msg ni route | 246 | return ( runPut $ putRequest $ wrapForRoute msg ni route |
247 | , nodeAddr $ routeNodeA route) | 247 | , nodeAddr $ routeNodeA route) |
248 | mapM' f x = do | 248 | mapM' f x = do |
249 | let _ = x :: Maybe OnionRoute | ||
249 | hPutStrLn stderr $ "ONION encode sending to " ++ show ni | 250 | hPutStrLn stderr $ "ONION encode sending to " ++ show ni |
250 | hPutStrLn stderr $ "ONION encode getRoute -> " ++ show (mapM (\y -> map ($ y) [routeNodeA,routeNodeB,routeNodeC]) x) | 251 | hPutStrLn stderr $ "ONION encode getRoute -> " ++ show (fmap (\y -> map ($ y) [routeNodeA,routeNodeB,routeNodeC]) x) |
251 | mapM f x | 252 | mapM f x -- ONION encode getRoute -> Nothing |
252 | getRoute ni rid >>= mapM' go | 253 | getRoute ni rid >>= mapM' go |
253 | 254 | ||
254 | 255 | ||