summaryrefslogtreecommitdiff
path: root/sysdep/unix/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r--sysdep/unix/io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 48f368a4..5ec728af 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -1253,8 +1253,9 @@ sk_setup(sock *s)
if (sk_is_ipv6(s))
{
- if (setsockopt(fd, SOL_IPV6, IPV6_V6ONLY, &y, sizeof(y)) < 0)
- ERR("IPV6_V6ONLY");
+ if (s->type != SK_IP)
+ if (setsockopt(fd, SOL_IPV6, IPV6_V6ONLY, &y, sizeof(y)) < 0)
+ ERR("IPV6_V6ONLY");
if (s->flags & SKF_LADDR_RX)
if (sk_request_cmsg6_pktinfo(s) < 0)