Use AI_PASSIVE flag to make tinyproxy listen on wildcard interface
Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
1 parent
243526d493
commit
2f86b79d85
1 file changed
+1
@@ -178,6 +178,7 @@ int listen_sock (uint16_t port, socklen_t * addrlen)
|
|||||||
memset (&hints, 0, sizeof (struct addrinfo));
|
memset (&hints, 0, sizeof (struct addrinfo));
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
|
hints.ai_flags = AI_PASSIVE;
|
||||||
|
|
||||||
snprintf (portstr, sizeof (portstr), "%d", port);
|
snprintf (portstr, sizeof (portstr), "%d", port);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user