]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/jwhois-4.0-ipv6match.patch
Replace whois by jwhois.
[ipfire-2.x.git] / src / patches / jwhois-4.0-ipv6match.patch
CommitLineData
c5e5324c
MT
1When IPv6 address mask did not end on an octed boundary, the the opposite
2part of last byte of host address was taken into account when a match was
3attempted. -- Lubomir Kundrak <lkundrak@redhat.com>
4
5--- jwhois-4.0/src/lookup.c.ipv6-match 2007-12-04 17:09:57.000000000 +0100
6+++ jwhois-4.0/src/lookup.c 2007-12-04 17:10:20.000000000 +0100
7@@ -149,7 +149,7 @@ static int ipv6_address_is_in_network(co
8 }
9 /* i == bits / 8 */
10 if (bits % 8 != 0
11- && (addr->s6_addr[i] & (0xFFu << (bits % 8))) != net->s6_addr[i])
12+ && (addr->s6_addr[i] & (0xFFu << 8-(bits % 8))) != net->s6_addr[i])
13 return 0;
14 return 1;
15 }