Commit d5c83d7c authored by Niels Möller's avatar Niels Möller
Browse files

(make_lshd_port): Check that IPV6_V6ONLY is defined

before trying to setsockopt it.

Rev: src/lshd.c:1.189
parent c6a482ac
......@@ -325,7 +325,7 @@ make_lshd_port(struct lshd_context *ctx, socklen_t addr_len, struct sockaddr *ad
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof (yes)) <0)
werror("setsockopt SO_REUSEADDR failed: %e.\n", errno);
#if WITH_IPV6
#if WITH_IPV6 && defined (IPV6_V6ONLY)
if (addr->sa_family == AF_INET6)
{
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof(yes)) < 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment