Commit 920f423a authored by Vadim Troshchinskiy's avatar Vadim Troshchinskiy

Make nxagent only bind to loopback when requested

parent e466a938
......@@ -6692,11 +6692,15 @@ int WaitForRemote(ChannelEndPoint &socketAddress)
strcpy(hostLabel, "any host");
}
if (loopbackBind)
long bindPort;
if (socketAddress.getTCPHostAndPort(NULL, &bindPort))
{
long bindPort;
if (socketAddress.getTCPHostAndPort(NULL, &bindPort))
socketAddress.setSpec("localhost", bindPort);
socketAddress.setSpec(loopbackBind ? "localhost" : "*", bindPort);
}
else
{
// This should never happen
cerr << "Error" << ": Unable to change bind host\n";
}
}
else if (socketAddress.isUnixSocket())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment