diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-02-04 14:15:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-02-04 14:15:59 +0000 |
commit | 2d81bf5ffd39cf2b0c6f1cc5c1ae643d34fd0378 (patch) | |
tree | 5d583c2a049e5ccc2ee4b0aa8318b719a4a3f8e9 /src | |
parent | 05de7b8b760415d86f955ff20b195d51b103603a (diff) | |
download | gnunet-2d81bf5ffd39cf2b0c6f1cc5c1ae643d34fd0378.tar.gz gnunet-2d81bf5ffd39cf2b0c6f1cc5c1ae643d34fd0378.zip |
client
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/gnunet-nat-client.c | 4 | ||||
-rw-r--r-- | src/transport/gnunet-nat-server.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/gnunet-nat-client.c b/src/transport/gnunet-nat-client.c index c4b327aac..ada7b3b18 100644 --- a/src/transport/gnunet-nat-client.c +++ b/src/transport/gnunet-nat-client.c | |||
@@ -121,6 +121,8 @@ static int rawsock; | |||
121 | 121 | ||
122 | static struct in_addr dummy; | 122 | static struct in_addr dummy; |
123 | 123 | ||
124 | static struct in_addr target; | ||
125 | |||
124 | 126 | ||
125 | /** | 127 | /** |
126 | * create a random port number that is not totally | 128 | * create a random port number that is not totally |
@@ -403,6 +405,7 @@ process_icmp_response (const struct in_addr *my_ip, | |||
403 | } | 405 | } |
404 | else | 406 | else |
405 | { | 407 | { |
408 | send_icmp (my_ip, &target, reply_magic, my_magic); | ||
406 | printf ("%s:%u\n", | 409 | printf ("%s:%u\n", |
407 | inet_ntop (AF_INET, | 410 | inet_ntop (AF_INET, |
408 | &sip, | 411 | &sip, |
@@ -479,7 +482,6 @@ make_raw_socket () | |||
479 | int | 482 | int |
480 | main (int argc, char *const *argv) | 483 | main (int argc, char *const *argv) |
481 | { | 484 | { |
482 | struct in_addr target; | ||
483 | struct in_addr external; | 485 | struct in_addr external; |
484 | unsigned int i; | 486 | unsigned int i; |
485 | unsigned int pos; | 487 | unsigned int pos; |
diff --git a/src/transport/gnunet-nat-server.c b/src/transport/gnunet-nat-server.c index 77b73b708..0bf398231 100644 --- a/src/transport/gnunet-nat-server.c +++ b/src/transport/gnunet-nat-server.c | |||
@@ -376,8 +376,8 @@ process_icmp_response (const struct in_addr *my_ip, | |||
376 | return; | 376 | return; |
377 | } | 377 | } |
378 | memcpy(&sip, &ip_pkt.src_ip, sizeof (sip)); | 378 | memcpy(&sip, &ip_pkt.src_ip, sizeof (sip)); |
379 | my_magic = ntohs (udp_pkt.checksum_aka_my_magic); | 379 | reply_magic = ntohs (udp_pkt.checksum_aka_my_magic); |
380 | reply_magic = ntohs (udp_pkt.mlen_aka_reply_port_magic); | 380 | my_magic = ntohs (udp_pkt.mlen_aka_reply_port_magic); |
381 | fprintf (stderr, | 381 | fprintf (stderr, |
382 | "Received ICMP from `%s' with hints %u and %u\n", | 382 | "Received ICMP from `%s' with hints %u and %u\n", |
383 | inet_ntop (AF_INET, | 383 | inet_ntop (AF_INET, |