669b9d9
When IPv6 address mask did not end on an octed boundary, the the opposite
669b9d9
part of last byte of host address was taken into account when a match was
669b9d9
attempted. -- Lubomir Kundrak <lkundrak@redhat.com>
669b9d9
669b9d9
--- jwhois-4.0/src/lookup.c.ipv6-match	2007-12-04 17:09:57.000000000 +0100
669b9d9
+++ jwhois-4.0/src/lookup.c	2007-12-04 17:10:20.000000000 +0100
669b9d9
@@ -149,7 +149,7 @@ static int ipv6_address_is_in_network(co
669b9d9
     }
669b9d9
   /* i == bits / 8 */
669b9d9
   if (bits % 8 != 0
669b9d9
-      && (addr->s6_addr[i] & (0xFFu << (bits % 8))) != net->s6_addr[i])
669b9d9
+      && (addr->s6_addr[i] & (0xFFu << 8-(bits % 8))) != net->s6_addr[i])
669b9d9
     return 0;
669b9d9
   return 1;
669b9d9
 }