]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Squelch sendto-permission denied errors when the network is
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 25 Jun 2013 07:03:03 +0000 (07:03 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 25 Jun 2013 07:03:03 +0000 (07:03 +0000)
  not connected, to avoid spamming syslog.

git-svn-id: file:///svn/unbound/trunk@2915 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/netevent.c

index 1a6d4acee5df7bc537cac034639435d1038ec50c..b97bfb720fad8c28c043946a1aeab0c052113d4d 100644 (file)
@@ -1,3 +1,7 @@
+25 Jun 2013: Wouter
+       - Squelch sendto-permission denied errors when the network is
+         not connected, to avoid spamming syslog.
+
 18 Jun 2013: Wouter
        - Fix for const string literals in C++ for libunbound, from Karel
          Slany.
index c5a7d8029f86a57f1c899f216fe0079b8e28d3f2..82521a1ec737324bf5d6f6639c6f120971c43f32 100644 (file)
@@ -320,6 +320,10 @@ udp_send_errno_needs_log(struct sockaddr* addr, socklen_t addrlen)
                        break;
        }
 #endif
+       /* permission denied is gotten for every send if the
+        * network is disconnected (on some OS), squelch it */
+       if(errno == EPERM && verbosity < VERB_DETAIL)
+               return 0;
        /* squelch errors where people deploy AAAA ::ffff:bla for
         * authority servers, which we try for intranets. */
        if(errno == EINVAL && addr_is_ip4mapped(