Fix for IPv6 addresses on non-multiaccess ifaces on BSD.

Thanks Matthias Schiffer for the patch.
This commit is contained in:
Ondrej Zajicek 2012-01-08 16:28:33 +01:00
parent 53ffbff39f
commit 3f58437405

View file

@ -544,7 +544,12 @@ krt_read_addr(struct ks_msg *msg)
_I0(ifa.ip) = 0xfe800000; _I0(ifa.ip) = 0xfe800000;
#endif #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) if (iface->flags & IF_MULTIACCESS)
#endif
{ {
ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen)); ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen));