]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #3582: Squelch address already in use log when reuseaddr option
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Mar 2018 15:45:34 +0000 (15:45 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Mar 2018 15:45:34 +0000 (15:45 +0000)
  causes same port to be used twice for tcp connections.

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

doc/Changelog
util/netevent.c

index 5df3701d19d43e4a8166ae5fe3f2b1be9a60c39b..2381450888b4709db6c679dd59ea7e833f10c6bc 100644 (file)
@@ -1,6 +1,8 @@
 5 March 2018: Wouter
        - Fix to check define of DSA for when openssl is without deprecated.
        - iana port update.
+       - Fix #3582: Squelch address already in use log when reuseaddr option
+         causes same port to be used twice for tcp connections.
 
 27 February 2018: Wouter
        - Fixup contrib/fastrpz.patch so that it applies.
index 97e31dcbe6f1ae1e129f0f3f423ca1d8c0bdad6f..fc6f6a9ea8b52a39a50817ec92d60b21ee1d7724 100644 (file)
@@ -299,6 +299,12 @@ udp_send_errno_needs_log(struct sockaddr* addr, socklen_t addrlen)
 #  endif
                ) && verbosity < VERB_DETAIL)
                return 0;
+#  ifdef EADDRINUSE
+       /* If SO_REUSEADDR is set, we could try to connect to the same server
+        * from the same source port twice. */
+       if(errno == EADDRINUSE && verbosity < VERB_DETAIL)
+               return 0;
+#  endif
        /* squelch errors where people deploy AAAA ::ffff:bla for
         * authority servers, which we try for intranets. */
        if(errno == EINVAL && addr_is_ip4mapped(