diff options
author | irungentoo <irungentoo@gmail.com> | 2015-01-13 15:04:41 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-01-13 15:04:41 -0500 |
commit | 5e1d6f51831f09cc636cb40c60e4012cb7878f22 (patch) | |
tree | a4e64363946661a8fad54b918ee01bda3c353fd7 /toxcore/TCP_server.c | |
parent | 6650f18b865043ac4980992b7c9be6e776db76b0 (diff) |
Fix TCP server regression.
onion.c was parsing recieved packets a bit too strictly and discarding
packets that had ips with non valid families.
TCP uses a non valid family to send back the packet to the proper
connected node.
Diffstat (limited to 'toxcore/TCP_server.c')
-rw-r--r-- | toxcore/TCP_server.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c index 250d6c44..f31dbafd 100644 --- a/toxcore/TCP_server.c +++ b/toxcore/TCP_server.c | |||
@@ -812,6 +812,7 @@ static int handle_TCP_packet(TCP_Server *TCP_server, uint32_t con_id, const uint | |||
812 | source.port = 0; // dummy initialise | 812 | source.port = 0; // dummy initialise |
813 | source.ip.family = TCP_ONION_FAMILY; | 813 | source.ip.family = TCP_ONION_FAMILY; |
814 | source.ip.ip6.uint32[0] = con_id; | 814 | source.ip.ip6.uint32[0] = con_id; |
815 | source.ip.ip6.uint32[1] = 0; | ||
815 | source.ip.ip6.uint64[1] = con->identifier; | 816 | source.ip.ip6.uint64[1] = con->identifier; |
816 | onion_send_1(TCP_server->onion, data + 1 + crypto_box_NONCEBYTES, length - (1 + crypto_box_NONCEBYTES), source, | 817 | onion_send_1(TCP_server->onion, data + 1 + crypto_box_NONCEBYTES, length - (1 + crypto_box_NONCEBYTES), source, |
817 | data + 1); | 818 | data + 1); |