]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
ignore transient sendto conditions.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 20 Jul 2009 08:35:13 +0000 (08:35 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 20 Jul 2009 08:35:13 +0000 (08:35 +0000)
git-svn-id: file:///svn/unbound/trunk@1731 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/netevent.c

index 92781f2843c6e4fc847f7d944f6bafb0d7b7b197..58f240a10e087f6864ffb5331c5234288d453780 100644 (file)
@@ -1,3 +1,6 @@
+20 July 2009: Wouter
+       - Ignore transient sendto errors, no route to host, and host, net down.
+
 16 July 2009: Wouter
        - fix replacement malloc code.  Used in crosscompile.
        - makedist -w creates crosscompiled setup.exe on fedora11.
index c10f688ce1077032d20fc85e39d26eadafcda6a5..93b1a04be9857c9817cc685956d2c805ac54e1b0 100644 (file)
@@ -250,9 +250,26 @@ comm_point_send_udp_msg(struct comm_point *c, ldns_buffer* packet,
                ldns_buffer_remaining(packet), 0,
                addr, addrlen);
        if(sent == -1) {
-#ifdef ENETUNREACH
-               if(errno == ENETUNREACH && verbosity < VERB_ALGO)
-                       return 0;
+               /* do not log transient errors (unless high verbosity) */
+#if defined(ENETUNREACH) || defined(EHOSTDOWN) || defined(EHOSTUNREACH) || defined(ENETDOWN)
+               switch(errno) {
+#  ifdef ENETUNREACH
+                       case ENETUNREACH:
+#  endif
+#  ifdef EHOSTDOWN
+                       case EHOSTDOWN:
+#  endif
+#  ifdef EHOSTUNREACH
+                       case EHOSTUNREACH:
+#  endif
+#  ifdef ENETDOWN
+                       case ENETDOWN:
+#  endif
+                               if(verbosity < VERB_ALGO)
+                                       return 0;
+                       default:
+                               break;
+               }
 #endif
                /* squelch errors where people deploy AAAA ::ffff:bla for
                 * authority servers, which we try for intranets. */