]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Retry for interfaces with unused ports if possible.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 12 Nov 2020 12:36:37 +0000 (13:36 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 12 Nov 2020 12:36:37 +0000 (13:36 +0100)
doc/Changelog
services/outside_network.c

index e9b8649fda4165bd4bdb813b97b24da99965e9c7..613d14cb7b4ed18143feafc3c4871f14c04f2c20 100644 (file)
@@ -1,6 +1,7 @@
 12 November 2020: Wouter
        - Fix to connect() to UDP destinations, default turned on,
          this lowers vulnerability to ICMP side channels.
+       - Retry for interfaces with unused ports if possible.
 
 10 November 2020: Wouter
        - Fix #341: fixing a possible memory leak.
index cef76053c58d33d7c689e9dfdbffd69739d2aca8..d184da5456dcc59aa5f6cb437b8ee81847d12e1b 100644 (file)
@@ -1118,6 +1118,9 @@ select_ifport(struct outside_network* outnet, struct pending* pend,
                if(1) {
                        /* if we connect() we cannot reuse fds for a port */
                        if(pif->inuse >= pif->avail_total) {
+                               tries++;
+                               if(tries < MAX_PORT_RETRY)
+                                       continue;
                                log_err("failed to find an open port, drop msg");
                                return 0;
                        }