diff options
-rw-r--r-- | sys/netinet6/in6.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index d5bd36c..801472a 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1830,7 +1830,8 @@ in6_are_prefix_equal(p1, p2, len) if (bcmp(&p1->s6_addr, &p2->s6_addr, bytelen)) return (0); - if (p1->s6_addr[bytelen] >> (8 - bitlen) != + if (bitlen != 0 && + p1->s6_addr[bytelen] >> (8 - bitlen) != p2->s6_addr[bytelen] >> (8 - bitlen)) return (0); |