summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Crypto
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2018-06-01 03:27:45 +0000
committerJames Crayne <jim.crayne@gmail.com>2018-06-01 03:27:45 +0000
commit08cbac1689bfc112b30a5e707d68bd0d11671990 (patch)
tree3da1e9a2255aa626495b3ccbfbbfee7af7537efc /src/Network/Tox/Crypto
parentdd51eaf8b31b935f85732ac2ba73adb9978a70af (diff)
canonicalize ip upon sessionPacketH
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index 6f20e670..d3bf9606 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -859,7 +859,8 @@ handshakeH sessions addrRaw hshake@(Handshake (Cookie n24 ecookie) nonce24 encry
859 return Nothing 859 return Nothing
860 860
861sessionPacketH :: NetCryptoSessions -> SockAddr -> CryptoPacket Encrypted -> IO (Maybe (x -> x)) 861sessionPacketH :: NetCryptoSessions -> SockAddr -> CryptoPacket Encrypted -> IO (Maybe (x -> x))
862sessionPacketH sessions addr (CryptoPacket nonce16 encrypted) = do 862sessionPacketH sessions addrRaw (CryptoPacket nonce16 encrypted) = do
863 let addr = either id id $ either4or6 addrRaw
863 dput XNetCrypto ("RECIEVED CRYPTOPACKET from " ++ show addr) 864 dput XNetCrypto ("RECIEVED CRYPTOPACKET from " ++ show addr)
864 let crypto = transportCrypto sessions 865 let crypto = transportCrypto sessions
865 allsessions = netCryptoSessions sessions 866 allsessions = netCryptoSessions sessions