From: Mark Zealey Date: Mon, 13 Jan 2014 12:26:27 +0000 (+0200) Subject: merge with head X-Git-Tag: rec-3.6.0-rc1~239^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a631875de6200c5e29aa796fe3254840fa60095;p=pdns merge with head --- 4a631875de6200c5e29aa796fe3254840fa60095 diff --cc pdns/common_startup.cc index 05b38792f,82d1bbf6c..a0fc5c7a3 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@@ -53,8 -53,9 +53,10 @@@ void declareArguments( ::arg().set("urlredirector","Where we send hosts to that need to be url redirected")="127.0.0.1"; ::arg().set("smtpredirector","Our smtpredir MX host")="a.misconfigured.powerdns.smtp.server"; ::arg().set("local-address","Local IP addresses to which we bind")="0.0.0.0"; + ::arg().setSwitch("local-address-nonexist-fail","Fail to start if one or more of the local-address's do not exist on this server")="yes"; ::arg().set("local-ipv6","Local IP address to which we bind")=""; + ::arg().setSwitch("reuseport","Enable higher performance on compliant kernels by using SO_REUSEPORT allowing each receiver thread to open its own socket")="no"; + ::arg().setSwitch("local-ipv6-nonexist-fail","Fail to start if one or more of the local-ipv6 addresses do not exist on this server")="yes"; ::arg().set("query-local-address","Source IP address for sending queries")="0.0.0.0"; ::arg().set("query-local-address6","Source IPv6 address for sending queries")="::"; ::arg().set("overload-queue-length","Maximum queuelength moving to packetcache only")="0"; diff --cc pdns/nameserver.cc index 784a54748,04d902701..3f044190c --- a/pdns/nameserver.cc +++ b/pdns/nameserver.cc @@@ -132,12 -126,15 +132,17 @@@ void UDPNameserver::bindIPv4( if(locala.sin4.sin_family != AF_INET) throw PDNSException("Attempting to bind IPv4 socket to IPv6 address"); - g_localaddresses.push_back(locala); + if( !d_additional_socket ) + g_localaddresses.push_back(locala); + if(::bind(s, (sockaddr*)&locala, locala.getSocklen()) < 0) { - L<