summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-06-18 19:20:07 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-06-18 19:20:07 +0200
commit789772ed4586213d6a7fbb867b9296a01ce1b9c0 (patch)
tree52ba2a4a50a3ddce85a13d219446691edda280d8 /sysdep/unix
parent1b3b3e34ecbc281a13d4ca0b99e891ee9c4d5cac (diff)
Implements option that changes BGP listening socket parametres.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/io.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 50992fb4..58aed4ee 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -703,7 +703,13 @@ sk_setup(sock *s)
if ((s->tos >= 0) && setsockopt(fd, SOL_IP, IP_TOS, &s->tos, sizeof(s->tos)) < 0)
WARN("IP_TOS");
#endif
-
+
+#ifdef IPV6
+ int v = 1;
+ if ((s->flags & SKF_V6ONLY) && setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &v, sizeof(v)) < 0)
+ WARN("IPV6_V6ONLY");
+#endif
+
if (s->ttl >= 0)
err = sk_set_ttl_int(s);
else