diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-10 22:14:20 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-10 22:14:20 +0000 |
commit | fdc6131af11cb2ecbce11536eb0d526bdfae3e52 (patch) | |
tree | b510245a7aba5cab41d05cf512b32a5b1bebf2bc /src/nat/gnunet-helper-nat-client.c | |
parent | 7d665dae3d891aa9e7342eda2c9f2339641211c9 (diff) | |
download | gnunet-fdc6131af11cb2ecbce11536eb0d526bdfae3e52.tar.gz gnunet-fdc6131af11cb2ecbce11536eb0d526bdfae3e52.zip |
-fix #3192, as suggested
Diffstat (limited to 'src/nat/gnunet-helper-nat-client.c')
-rw-r--r-- | src/nat/gnunet-helper-nat-client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nat/gnunet-helper-nat-client.c b/src/nat/gnunet-helper-nat-client.c index 46d51a38c..5d9d25f48 100644 --- a/src/nat/gnunet-helper-nat-client.c +++ b/src/nat/gnunet-helper-nat-client.c | |||
@@ -237,7 +237,11 @@ send_icmp_udp (const struct in_addr *my_ip, const struct in_addr *other) | |||
237 | off = 0; | 237 | off = 0; |
238 | ip_pkt.vers_ihl = 0x45; | 238 | ip_pkt.vers_ihl = 0x45; |
239 | ip_pkt.tos = 0; | 239 | ip_pkt.tos = 0; |
240 | #ifdef FREEBSD | ||
241 | ip_pkt.pkt_len = sizeof (packet); /* Workaround PR kern/21737 */ | ||
242 | #else | ||
240 | ip_pkt.pkt_len = htons (sizeof (packet)); | 243 | ip_pkt.pkt_len = htons (sizeof (packet)); |
244 | #endif | ||
241 | ip_pkt.id = htons (PACKET_ID); | 245 | ip_pkt.id = htons (PACKET_ID); |
242 | ip_pkt.flags_frag_offset = 0; | 246 | ip_pkt.flags_frag_offset = 0; |
243 | ip_pkt.ttl = 128; | 247 | ip_pkt.ttl = 128; |
@@ -334,7 +338,11 @@ send_icmp (const struct in_addr *my_ip, const struct in_addr *other) | |||
334 | off = 0; | 338 | off = 0; |
335 | ip_pkt.vers_ihl = 0x45; | 339 | ip_pkt.vers_ihl = 0x45; |
336 | ip_pkt.tos = 0; | 340 | ip_pkt.tos = 0; |
341 | #ifdef FREEBSD | ||
342 | ip_pkt.pkt_len = sizeof (packet); /* Workaround PR kern/21737 */ | ||
343 | #else | ||
337 | ip_pkt.pkt_len = htons (sizeof (packet)); | 344 | ip_pkt.pkt_len = htons (sizeof (packet)); |
345 | #endif | ||
338 | ip_pkt.id = htons (PACKET_ID); | 346 | ip_pkt.id = htons (PACKET_ID); |
339 | ip_pkt.flags_frag_offset = 0; | 347 | ip_pkt.flags_frag_offset = 0; |
340 | ip_pkt.ttl = IPDEFTTL; | 348 | ip_pkt.ttl = IPDEFTTL; |