From ac0af919129ea36e14d3b7c3f14d86a73c2a7fa6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 2 Dec 2008 10:22:21 +0100 Subject: [PATCH] listen: enable AI_PASSIVE The getaddrinfo() flag AI_PASSIVE should be used when resolving addresses for the bind() system call. --- src/listen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/listen.c b/src/listen.c index 9a4d60555..0e2dd6611 100644 --- a/src/listen.c +++ b/src/listen.c @@ -190,7 +190,7 @@ static void parseListenConfigParam(unsigned int port, ConfigParam * param) DEBUG("binding to address for %s\n", param->value); memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_ADDRCONFIG; + hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP;