aboutsummaryrefslogtreecommitdiff
path: root/src/nat
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-16 12:10:03 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-16 12:10:03 +0000
commit17f94e7fc0dfabbbd9868b72f957209549a16b5a (patch)
tree3f7c268e912f3674eb7ce8b9c1536c81105dcaeb /src/nat
parent1ff3c89a1a0eb49baee9c80b2a1043aefd2bf201 (diff)
downloadgnunet-17f94e7fc0dfabbbd9868b72f957209549a16b5a.tar.gz
gnunet-17f94e7fc0dfabbbd9868b72f957209549a16b5a.zip
-make assignment cleaner, move to where it is needed
Diffstat (limited to 'src/nat')
-rw-r--r--src/nat/gnunet-helper-nat-server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nat/gnunet-helper-nat-server.c b/src/nat/gnunet-helper-nat-server.c
index 733c00dc2..583a2f082 100644
--- a/src/nat/gnunet-helper-nat-server.c
+++ b/src/nat/gnunet-helper-nat-server.c
@@ -359,7 +359,6 @@ process_icmp_response ()
359 off = 0; 359 off = 0;
360 memcpy (&ip_pkt, &buf[off], sizeof (struct ip_header)); 360 memcpy (&ip_pkt, &buf[off], sizeof (struct ip_header));
361 off += sizeof (struct ip_header); 361 off += sizeof (struct ip_header);
362 memcpy (&source_ip, &ip_pkt.src_ip, sizeof (source_ip));
363 memcpy (&icmp_ttl, &buf[off], sizeof (struct icmp_ttl_exceeded_header)); 362 memcpy (&icmp_ttl, &buf[off], sizeof (struct icmp_ttl_exceeded_header));
364 off += sizeof (struct icmp_ttl_exceeded_header); 363 off += sizeof (struct icmp_ttl_exceeded_header);
365 if ((ICMP_TIME_EXCEEDED != icmp_ttl.type) || (0 != icmp_ttl.code)) 364 if ((ICMP_TIME_EXCEEDED != icmp_ttl.type) || (0 != icmp_ttl.code))
@@ -403,6 +402,7 @@ process_icmp_response ()
403 return; 402 return;
404 } 403 }
405 404
405 source_ip.s_addr = ip_pkt.src_ip;
406 if (port == 0) 406 if (port == 0)
407 fprintf (stdout, "%s\n", 407 fprintf (stdout, "%s\n",
408 inet_ntop (AF_INET, &source_ip, buf, sizeof (buf))); 408 inet_ntop (AF_INET, &source_ip, buf, sizeof (buf)));