summaryrefslogtreecommitdiff
path: root/sysdep/bsd/krt-sock.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-01-08 16:28:33 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2012-01-08 16:32:28 +0100
commit3f58437405f8e37e9c14d83274a6b82ffd9583f8 (patch)
tree27f9b0fe69e1ec50f31a50c03f1a55dca2eabac2 /sysdep/bsd/krt-sock.c
parent53ffbff39f054e1302fb296327b9bb1b4f88226c (diff)
Fix for IPv6 addresses on non-multiaccess ifaces on BSD.
Thanks Matthias Schiffer for the patch.
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r--sysdep/bsd/krt-sock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index 1647c5ea..a41be838 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -544,7 +544,12 @@ krt_read_addr(struct ks_msg *msg)
_I0(ifa.ip) = 0xfe800000;
#endif
+#ifdef IPV6
+ /* Why not the same check also for IPv4? */
+ if ((iface->flags & IF_MULTIACCESS) || (masklen != BITS_PER_IP_ADDRESS))
+#else
if (iface->flags & IF_MULTIACCESS)
+#endif
{
ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen));