From: Wouter Wijngaards Date: Tue, 25 Jun 2013 07:03:03 +0000 (+0000) Subject: - Squelch sendto-permission denied errors when the network is X-Git-Tag: release-1.4.21rc1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18e488ec5d9e4970e90657a3b8a77dbdf4017617;p=thirdparty%2Funbound.git - Squelch sendto-permission denied errors when the network is not connected, to avoid spamming syslog. git-svn-id: file:///svn/unbound/trunk@2915 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 1a6d4acee..b97bfb720 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/util/netevent.c b/util/netevent.c index c5a7d8029..82521a1ec 100644 --- a/util/netevent.c +++ b/util/netevent.c @@ -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(