gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r19455 - gnunet/src/exit


From: gnunet
Subject: [GNUnet-SVN] r19455 - gnunet/src/exit
Date: Thu, 26 Jan 2012 22:23:34 +0100

Author: grothoff
Date: 2012-01-26 22:23:34 +0100 (Thu, 26 Jan 2012)
New Revision: 19455

Modified:
   gnunet/src/exit/gnunet-daemon-exit.c
Log:
-fix address order and mask calculation

Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c        2012-01-26 18:37:12 UTC (rev 
19454)
+++ gnunet/src/exit/gnunet-daemon-exit.c        2012-01-26 21:23:34 UTC (rev 
19455)
@@ -1152,7 +1152,7 @@
       /* Given ABCD::/96, we want a mask of 'ABCD::FFFF:FFFF,
         thus: */
       mask = addr;
-      for (i=127;i>=128-ipv6prefix;i--)
+      for (i=127;i>=ipv6prefix;i--)
        mask.s6_addr[i / 8] |= (1 << (i % 8));
       
       /* Pick random IPv6 address within the subnet, except 'addr' or 'mask' 
itself */
@@ -1393,9 +1393,9 @@
 
   GNUNET_TUN_initialize_ipv6_header (pkt6,
                                     protocol,
-                                    len,
-                                    &dst_address->address.ipv6,
-                                    &src_address->address.ipv6);
+                                    len,                                  
+                                    &src_address->address.ipv6,
+                                    &dst_address->address.ipv6);
 
   switch (protocol)
   {




reply via email to

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