]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Make sure we don't try to do notifications to IPv6 if we have no IPv6 (and vv for...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sat, 6 Oct 2012 11:21:32 +0000 (11:21 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sat, 6 Oct 2012 11:21:32 +0000 (11:21 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2772 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/mastercommunicator.cc

index c555eeeb69c6e7fd81a06e189908a5b9258826b0..3ac1fc8462b08a6493bfc2fd0f719084002a100f 100644 (file)
@@ -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);
       }