gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18626 - gnunet/src/nat


From: gnunet
Subject: [GNUnet-SVN] r18626 - gnunet/src/nat
Date: Fri, 16 Dec 2011 13:10:03 +0100

Author: grothoff
Date: 2011-12-16 13:10:03 +0100 (Fri, 16 Dec 2011)
New Revision: 18626

Modified:
   gnunet/src/nat/gnunet-helper-nat-server.c
Log:
-make assignment cleaner, move to where it is needed

Modified: gnunet/src/nat/gnunet-helper-nat-server.c
===================================================================
--- gnunet/src/nat/gnunet-helper-nat-server.c   2011-12-16 11:19:15 UTC (rev 
18625)
+++ gnunet/src/nat/gnunet-helper-nat-server.c   2011-12-16 12:10:03 UTC (rev 
18626)
@@ -359,7 +359,6 @@
   off = 0;
   memcpy (&ip_pkt, &buf[off], sizeof (struct ip_header));
   off += sizeof (struct ip_header);
-  memcpy (&source_ip, &ip_pkt.src_ip, sizeof (source_ip));
   memcpy (&icmp_ttl, &buf[off], sizeof (struct icmp_ttl_exceeded_header));
   off += sizeof (struct icmp_ttl_exceeded_header);
   if ((ICMP_TIME_EXCEEDED != icmp_ttl.type) || (0 != icmp_ttl.code))
@@ -403,6 +402,7 @@
     return;
   }
 
+  source_ip.s_addr = ip_pkt.src_ip;
   if (port == 0)
     fprintf (stdout, "%s\n",
              inet_ntop (AF_INET, &source_ip, buf, sizeof (buf)));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]