diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-24 21:24:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-24 21:24:04 +0000 |
commit | 73abffab0522085cc12ef2a29afdf669c6f54a41 (patch) | |
tree | febaff3da9f63d468c4d9fdbc157b9b83411a712 /src/exit | |
parent | 41c8678659c808f55ded18ac08e5e76a681d4e74 (diff) | |
download | gnunet-73abffab0522085cc12ef2a29afdf669c6f54a41.tar.gz gnunet-73abffab0522085cc12ef2a29afdf669c6f54a41.zip |
-fix
Diffstat (limited to 'src/exit')
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index adabb70e5..3bf26d7b8 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -668,8 +668,9 @@ icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp, | |||
668 | /* could be TCP or UDP, but both have the ports in the right | 668 | /* could be TCP or UDP, but both have the ports in the right |
669 | place, so that doesn't matter here */ | 669 | place, so that doesn't matter here */ |
670 | udp = (const struct GNUNET_TUN_UdpHeader *) &ipv4[1]; | 670 | udp = (const struct GNUNET_TUN_UdpHeader *) &ipv4[1]; |
671 | source_port = ntohs (udp->source_port); | 671 | /* swap ports, as they are from the original message */ |
672 | destination_port = ntohs (udp->destination_port); | 672 | destination_port = ntohs (udp->source_port); |
673 | source_port = ntohs (udp->destination_port); | ||
673 | /* throw away ICMP payload, won't be useful for the other side anyway */ | 674 | /* throw away ICMP payload, won't be useful for the other side anyway */ |
674 | pktlen = sizeof (struct GNUNET_TUN_IcmpHeader); | 675 | pktlen = sizeof (struct GNUNET_TUN_IcmpHeader); |
675 | break; | 676 | break; |
@@ -701,8 +702,9 @@ icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp, | |||
701 | /* could be TCP or UDP, but both have the ports in the right | 702 | /* could be TCP or UDP, but both have the ports in the right |
702 | place, so that doesn't matter here */ | 703 | place, so that doesn't matter here */ |
703 | udp = (const struct GNUNET_TUN_UdpHeader *) &ipv6[1]; | 704 | udp = (const struct GNUNET_TUN_UdpHeader *) &ipv6[1]; |
704 | source_port = ntohs (udp->source_port); | 705 | /* swap ports, as they are from the original message */ |
705 | destination_port = ntohs (udp->destination_port); | 706 | destination_port = ntohs (udp->source_port); |
707 | source_port = ntohs (udp->destination_port); | ||
706 | /* throw away ICMP payload, won't be useful for the other side anyway */ | 708 | /* throw away ICMP payload, won't be useful for the other side anyway */ |
707 | pktlen = sizeof (struct GNUNET_TUN_IcmpHeader); | 709 | pktlen = sizeof (struct GNUNET_TUN_IcmpHeader); |
708 | break; | 710 | break; |