1
0
mirror of https://github.com/bgp/bgpq4.git synced 2024-05-11 05:55:05 +00:00

ok, bug with ipv6 fixed..

This commit is contained in:
snar
2008-05-12 17:02:55 +00:00
parent a1182c81a2
commit d6685d4d19

View File

@ -198,7 +198,7 @@ sx_prefix_isbitset(struct sx_prefix* p, int n)
unsigned char s;
/* bits outside the prefix considered unset */
if(p->family==AF_INET && (n<0 || n>32)) return 0;
else if(p->family==AF_INET6 && (n<0 || n>32)) return 0;
else if(p->family==AF_INET6 && (n<0 || n>128)) return 0;
s=p->addr.addrs[(n-1)/8];
return (s&(0x80>>((n-1)%8)))?1:0;
};