From: Bert Hubert Date: Sat, 6 Oct 2012 11:21:32 +0000 (+0000) Subject: Make sure we don't try to do notifications to IPv6 if we have no IPv6 (and vv for... X-Git-Tag: auth-3.2-rc1~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=16d1f6097faf26f8258f30f67d446ec44bf474d7;p=thirdparty%2Fpdns.git Make sure we don't try to do notifications to IPv6 if we have no IPv6 (and vv for IPv4). Closes ticket 515. git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2772 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/mastercommunicator.cc b/pdns/mastercommunicator.cc index c555eeeb69..3ac1fc8462 100644 --- a/pdns/mastercommunicator.cc +++ b/pdns/mastercommunicator.cc @@ -166,6 +166,9 @@ time_t CommunicatorClass::doNotifications() if(!purged) { try { ComboAddress remote(ip, 53); // default to 53 + if((d_nsock6 < 0 && remote.sin4.sin_family == AF_INET6) || + (d_nsock4 < 0 && remote.sin4.sin_family == AF_INET)) + continue; // don't try to notify what we can't! sendNotification(remote.sin4.sin_family == AF_INET ? d_nsock4 : d_nsock6, domain, remote, id); drillHole(domain, ip); }