[PATCH 1/4] BSD: Correctly read numbered v6 addresses on ptp interfaces When using IPv6, unnumbered interfaces can have numbered IP addresses; one example are link-local addresses, which always have a prefix length of 64.
Matthias Schiffer
mschiffer at universe-factory.net
Thu Dec 29 22:56:44 CET 2011
Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
sysdep/bsd/krt-sock.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index 1647c5e..b70f166 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -544,7 +544,11 @@ krt_read_addr(struct ks_msg *msg)
_I0(ifa.ip) = 0xfe800000;
#endif
+#ifdef IPV6
+ 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));
--
1.7.8.1
More information about the Bird-users
mailing list