summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sock.c b/src/sock.c
index bf32c78..eef3bd0 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -178,6 +178,7 @@ int listen_sock (uint16_t port, socklen_t * addrlen)
memset (&hints, 0, sizeof (struct addrinfo));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_PASSIVE;
snprintf (portstr, sizeof (portstr), "%d", port);