From: Bert Hubert Date: Wed, 18 Jun 2008 21:11:26 +0000 (+0000) Subject: fix explicit /32 IP matches - found by Stefan Schmidt, plus document X-Git-Tag: rec-3.1.7.1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8519b8a273043d360c0229feb966ca02814c65fb;p=thirdparty%2Fpdns.git fix explicit /32 IP matches - found by Stefan Schmidt, plus document git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1205 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/docs/pdns.sgml b/pdns/docs/pdns.sgml index b096e4a389..de3bf5509c 100644 --- a/pdns/docs/pdns.sgml +++ b/pdns/docs/pdns.sgml @@ -151,6 +151,13 @@ in syncres.cc, fixed in c1189. + + + Stefan Schmidt discovered that the netmask matching code, used by the new Lua scripts, but also by all other parts of PowerDNS, had problems + with explicit '/32' matches. Fixed in c1205. + + + @@ -7983,8 +7990,7 @@ local0.err /var/log/pdns.err - In PowerDNS versions 3.0.0 and 3.0.1 this command is slightly buggy and might cause your nameserver to crash if the first - query after wiping the cache is for the domain you just wiped. + As of 3.1.7, this command also wipes the negative query cache for the specified domain. diff --git a/pdns/iputils.hh b/pdns/iputils.hh index 19408e384b..337854d80b 100644 --- a/pdns/iputils.hh +++ b/pdns/iputils.hh @@ -207,6 +207,8 @@ public: d_bits = (uint8_t) atoi(split.second.c_str()); if(d_bits<32) d_mask=~(0xFFFFFFFF>>d_bits); + else + d_mask=0xFFFFFFFF; } else if(d_network.sin4.sin_family==AF_INET) { d_bits = 32;