summaryrefslogtreecommitdiffstats
path: root/common/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/socket.c')
-rw-r--r--common/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/socket.c b/common/socket.c
index b276864..e2968a6 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -172,7 +172,7 @@ int socket_create(uint16_t port)
172 172
173 memset((void *) &saddr, 0, sizeof(saddr)); 173 memset((void *) &saddr, 0, sizeof(saddr));
174 saddr.sin_family = AF_INET; 174 saddr.sin_family = AF_INET;
175 saddr.sin_addr.s_addr = htonl(INADDR_ANY); 175 saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
176 saddr.sin_port = htons(port); 176 saddr.sin_port = htons(port);
177 177
178 if (0 > bind(sfd, (struct sockaddr *) &saddr, sizeof(saddr))) { 178 if (0 > bind(sfd, (struct sockaddr *) &saddr, sizeof(saddr))) {
@@ -329,7 +329,7 @@ int socket_accept(int fd, uint16_t port)
329 329
330 memset(&addr, 0, sizeof(addr)); 330 memset(&addr, 0, sizeof(addr));
331 addr.sin_family = AF_INET; 331 addr.sin_family = AF_INET;
332 addr.sin_addr.s_addr = htonl(INADDR_ANY); 332 addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
333 addr.sin_port = htons(port); 333 addr.sin_port = htons(port);
334 334
335 addr_len = sizeof(addr); 335 addr_len = sizeof(addr);