From 16d1f6097faf26f8258f30f67d446ec44bf474d7 Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sat, 6 Oct 2012 11:21:32 +0000 Subject: [PATCH] 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 --- pdns/mastercommunicator.cc | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.47.3