From: W.C.A. Wijngaards Date: Thu, 12 Nov 2020 12:36:37 +0000 (+0100) Subject: - Retry for interfaces with unused ports if possible. X-Git-Tag: release-1.13.0rc1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b891fe113ca9d9a2a19552531d8e91b8dcf02164;p=thirdparty%2Funbound.git - Retry for interfaces with unused ports if possible. --- diff --git a/doc/Changelog b/doc/Changelog index e9b8649fd..613d14cb7 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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. diff --git a/services/outside_network.c b/services/outside_network.c index cef76053c..d184da545 100644 --- a/services/outside_network.c +++ b/services/outside_network.c @@ -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; }