]>
Commit | Line | Data |
---|---|---|
c5e5324c MT |
1 | When IPv6 address mask did not end on an octed boundary, the the opposite |
2 | part of last byte of host address was taken into account when a match was | |
3 | attempted. -- 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 | } |