diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2012-05-18 10:19:59 +0100 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2012-05-18 10:19:59 +0100 |
commit | c64b7f6a7828b74a13836aee84f5bcdc30fb374e (patch) | |
tree | 7269bba298e05c9a3b92e1cc96f47c8c5872cdbd | |
parent | 068b4b51e3328bf42cffd871d79523c5fe8a203e (diff) | |
download | dnsmasq-2.62test2.tar.gz |
Fix is_same_net6 - bugged if prefix length not divisible by 8.v2.62test2
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | src/util.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -8,6 +8,10 @@ version 2.62 advertisements with some configurations. Thanks to Vladislav Grishenko for the patch. + Fixed bug which broke DHCPv6/RA with prefix lengths + which are not divisible by 8. Thanks to Andre Coetzee + for spotting this. + version 2.61 Re-write interface discovery code on *BSD to use @@ -330,7 +330,7 @@ int is_same_net6(struct in6_addr *a, struct in6_addr *b, int prefixlen) return 0; if (pfbits == 0 || - (a->s6_addr[pfbytes] >> (8 - pfbits) != b->s6_addr[pfbytes] >> (8 - pfbits))) + (a->s6_addr[pfbytes] >> (8 - pfbits) == b->s6_addr[pfbytes] >> (8 - pfbits))) return 1; return 0; |