Commit 829f2cc1 authored by Gary Wong's avatar Gary Wong

Explicitly bind to the loopback address.

Otherwise, the control and debug sockets are available without authentication
over the control net interface.
parent dce7ff6d
......@@ -102,7 +102,7 @@ libtools_socket_wrap::libtools_socket_wrap(uint32 *ip_a
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
memset(&s_addr, 0, sizeof(s_addr));
s_addr.sin_family = AF_INET;
s_addr.sin_addr.s_addr = INADDR_ANY;
s_addr.sin_addr.s_addr = htonl( INADDR_LOOPBACK );
s_addr.sin_port = htons(socket_port);
if(0 > sock)
{
......
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