]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- squelch TCP fast open error on FreeBSD when kernel has it disabled,
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 24 Jul 2017 09:14:42 +0000 (09:14 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 24 Jul 2017 09:14:42 +0000 (09:14 +0000)
  unless verbosity is high.

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

doc/Changelog
services/listen_dnsport.c

index 80a0d8aab5be9225877eb448032fb9d0499c393d..fe65b05c2a3183848aa1b1811233d239203e462f 100644 (file)
@@ -4,6 +4,8 @@
        - annotate case statement fallthrough for gcc 7.1.1.
        - flex output from flex 2.6.1.
        - snprintf of thread number does not warn about truncated string.
+       - squelch TCP fast open error on FreeBSD when kernel has it disabled,
+         unless verbosity is high.
 
 17 July 2017: Wouter
        - Fix #1350: make cachedb backend configurable (from JINMEI Tatuya).
index 0341f30674899a6e88dbfc86bdf964b617608167..3b53676d0e06eaddb1421b4fa7ef97aa5a687e17 100644 (file)
@@ -792,7 +792,12 @@ create_tcp_accept_sock(struct addrinfo *addr, int v6only, int* noproto,
 #endif
        if ((setsockopt(s, IPPROTO_TCP, TCP_FASTOPEN, &qlen, 
                  sizeof(qlen))) == -1 ) {
-               log_err("Setting TCP Fast Open as server failed: %s", strerror(errno));
+#ifdef ENOPROTOOPT
+               /* squelch ENOPROTOOPT: freebsd server mode with kernel support
+                  disabled, except when verbosity enabled for debugging */
+               if(errno != ENOPROTOOPT || verbosity >= 3)
+#endif
+                 log_err("Setting TCP Fast Open as server failed: %s", strerror(errno));
        }
 #endif
        return s;