Hi,
we're testing PowerDNS (built from SVN) as Master with dualstack. As
with IPv4 PowerDNS notifies each nameserver listed in NS resource records -
also the master. For IPv4 this works flawless and notification list will
rectified as expected. For IPv6 this seems not to work correct.
Being neither a C++ pro nor knowing PowerDNS-source fully in detail, patch
attached is a "works for me"-solution.
removeIf will be called with IP+Port as parameter, which is "[IPv6-
address]:Port" in IPv6 and "IPv4-address:Port" in IPv4. removeIf splits this
parameter on ":" which certainly go wrong on IPv6.
Best Regards,
Marcel
IPv4 (works):
> pdns[27482]: Queued notification of domain 'example.org' to 78.47.xx.x
> ...
> pdns[27482]: Received NOTIFY for example.org from 78.47.xx.x but slave
support is disabled in the configuration
> pdns[27482]: Received unsuccessful notification report for 'example.org' from
78.47.xx.x:53, rcode: 4
> pdns[27482]: Removed from notification list: 'example.org' to 78.47.xx.x:53
IPv6 (did not work):
> pdns[27482]: Queued notification of domain 'example.org' to
2a01:4f8:120:xxxx:x::53
> ...
> pdns[27482]: Received NOTIFY for example.org from 2a01:4f8:120:xxxx:x::53
but slave support is disabled in the configuration
> pdns[27482]: Received NOTIFY for example.org from 2a01:4f8:120:xxxx:x::53
but slave support is disabled in the configuration
> pdns[27482]: Received unsuccessful notification report for 'example.org' from
[2a01:4f8:120:xxxx:x::53]:53, rcode: 4
> pdns[27482]: Received spurious notify answer for 'example.org' from
[2a01:4f8:120:xxxx:x::53]:53
> pdns[27482]: Received NOTIFY for example.org from 2a01:4f8:120:xxxx:x::53
but slave support is disabled in the configuration
> pdns[27482]: Received unsuccessful notification report for 'example.org' from
[2a01:4f8:120:xxxx:x::53]:53, rcode: 4
> pdns[27482]: Received spurious notify answer for 'example.org' from
[2a01:4f8:120:xxxx:x::53]:53
IPv6 (after Patch):
> pdns[9513]: Queued notification of domain 'example.org' to
2a01:4f8:120:xxxx:x::53
> ...
> pdns[9513]: Received NOTIFY for example.org from 2a01:4f8:120:xxxx:x::53 but
slave support is disabled in the configuration
> pdns[9513]: Received unsuccessful notification report for 'example.org' from
[2a01:4f8:120:xxxx:x::53]:53, rcode: 4
> pdns[9513]: Removed from notification list: 'example.org' to
[2a01:4f8:120:xxxx:x::53]:53
Index: pdns/mastercommunicator.cc
===================================================================
--- pdns/mastercommunicator.cc (revision 2343)
+++ pdns/mastercommunicator.cc (working copy)
@@ -151,7 +151,7 @@
if(p.d.rcode)
L<<Logger::Warning<<"Received unsuccessful notification report for '"<<p.qdomain<<"' from "<<from.toStringWithPort()<<", rcode: "<<p.d.rcode<<endl;
- if(d_nq.removeIf(from.toStringWithPort(), p.d.id, p.qdomain))
+ if(d_nq.removeIf(from.toString(), p.d.id, p.qdomain))
L<<Logger::Warning<<"Removed from notification list: '"<<p.qdomain<<"' to "<<from.toStringWithPort()<< (p.d.rcode ? "" : " (was acknowledged)")<<endl;
else {
L<<Logger::Warning<<"Received spurious notify answer for '"<<p.qdomain<<"' from "<< from.toStringWithPort()<<endl;
Index: pdns/communicator.hh
===================================================================
--- pdns/communicator.hh (revision 2343)
+++ pdns/communicator.hh (working copy)
@@ -82,10 +82,7 @@
// cout<<i->id<<" "<<id<<endl;
//cout<<i->ip<<" "<<remote<<endl;
//cout<<i->domain<<" "<<domain<<endl;
- string remoteIP, ourIP, port;
- tie(remoteIP, port)=splitField(remote,':');
- tie(ourIP, port)=splitField(i->ip,':');
- if(i->id==id && ourIP == remoteIP && i->domain==domain) {
+ if(i->id==id && i->ip == remote && i->domain==domain) {
d_nqueue.erase(i);
return true;
}
_______________________________________________
Pdns-dev mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-dev