Permalink
Browse files

skip TCP_DEFER_ACCEPT on platforms that do not have it (like FreeBSD)…

…; fixes #1658
  • Loading branch information...
1 parent 1fe788e commit dad70f2c536d85778d66f46b98bc03914bf1db07 @Habbie Habbie committed Aug 19, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 pdns/dnsdist.cc
View
@@ -533,7 +533,9 @@ try
cs->tcpFD = SSocket(cs->local.sin4.sin_family, SOCK_STREAM, 0);
SSetsockopt(cs->tcpFD, SOL_SOCKET, SO_REUSEADDR, 1);
+#ifdef TCP_DEFER_ACCEPT
SSetsockopt(cs->tcpFD, SOL_TCP,TCP_DEFER_ACCEPT, 1);
+#endif
if(cs->local.sin4.sin_family == AF_INET6) {
SSetsockopt(cs->tcpFD, IPPROTO_IPV6, IPV6_V6ONLY, 1);
}

0 comments on commit dad70f2

Please sign in to comment.