]> granicus.if.org Git - pdns/commitdiff
fix ipv6 matching problem spotted by Wouter of WideXS (probably, could not verify...
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 7 Nov 2006 09:12:06 +0000 (09:12 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 7 Nov 2006 09:12:06 +0000 (09:12 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@916 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/iputils.hh

index 9ffcf943f21491f40e77d8c5d0bd4036245f281d..d5f18d0da2d7496411fc7acfa5b7d0bb3d320d23 100644 (file)
@@ -232,8 +232,9 @@ public:
        }
       }
       // still here, now match remaining bits
-      uint8_t bits=bytes%8;
+      uint8_t bits= d_bits % 8;
       uint8_t mask= ~(0xFF>>bits);
+
       return((us[n] & mask) == (them[n] & mask));
     }
     return false;