aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-02 10:22:21 +0100
committerMax Kellermann <max@duempel.org>2008-12-02 10:22:21 +0100
commitac0af919129ea36e14d3b7c3f14d86a73c2a7fa6 (patch)
treebe91aef814ac9df385a0a4c017d320ec35deb660 /src
parentc06ce44768d6fd5a87b97d9c8ab6df10dd692eb6 (diff)
downloadmpd-ac0af919129ea36e14d3b7c3f14d86a73c2a7fa6.tar.gz
mpd-ac0af919129ea36e14d3b7c3f14d86a73c2a7fa6.tar.xz
mpd-ac0af919129ea36e14d3b7c3f14d86a73c2a7fa6.zip
listen: enable AI_PASSIVE
The getaddrinfo() flag AI_PASSIVE should be used when resolving addresses for the bind() system call.
Diffstat (limited to '')
-rw-r--r--src/listen.c2
1 files changed, 1 insertions, 1 deletions
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;