diff options
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 4817df39..12ebe6de 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -546,7 +546,17 @@ krt_read_addr(struct ks_msg *msg) #endif if (iface->flags & IF_MULTIACCESS) + { ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen)); + + if (i->ifa_prefixlen == BITS_PER_IP_ADDRESS - 1) + ifa.opposite = ipa_opposite_m1(ifa.ip); + +#ifndef IPV6 + if (i->ifa_prefixlen == BITS_PER_IP_ADDRESS - 2) + ifa.opposite = ipa_opposite_m2(ifa.ip); +#endif + } else /* PtP iface */ { ifa.flags |= IA_UNNUMBERED; |