ret->useECS=boost::get<bool>(vars["useClientSubnet"]);
}
+ if(vars.count("ipBindAddrNoPort")) {
+ ret->ipBindAddrNoPort=boost::get<bool>(vars["ipBindAddrNoPort"]);
+ }
+
if(vars.count("maxCheckFailures")) {
ret->maxCheckFailures=std::stoi(boost::get<string>(vars["maxCheckFailures"]));
}
if (!IsAnyAddress(ds->sourceAddr)) {
SSetsockopt(sock, SOL_SOCKET, SO_REUSEADDR, 1);
#ifdef IP_BIND_ADDRESS_NO_PORT
- SSetsockopt(sock, SOL_IP, IP_BIND_ADDRESS_NO_PORT, 1);
+ if (ds->ipBindAddrNoPort) {
+ SSetsockopt(sock, SOL_IP, IP_BIND_ADDRESS_NO_PORT, 1);
+ }
#endif
SBind(sock, ds->sourceAddr);
}
bool setCD{false};
std::atomic<bool> connected{false};
bool tcpFastOpen{false};
+ bool ipBindAddrNoPort{true};
bool isUp() const
{
if(availability == Availability::Down)
tcpSendTimeout=NUM, -- The timeout (in seconds) of a TCP write attempt
tcpRecvTimeout=NUM, -- The timeout (in seconds) of a TCP read attempt
tcpFastOpen=BOOL, -- Whether to enable TCP Fast Open
+ ipBindAddrNoPort=BOOL, -- Whether to enable IP Bind Address No Port
name=STRING, -- The name associated to this backend, for display purpose
checkName=STRING, -- Use STRING as QNAME in the health-check query, default: "a.root-servers.net."
checkType=STRING, -- Use STRING as QTYPE in the health-check query, default: "A"