Adds support for PTP links on BSD.
This commit is contained in:
parent
53434e44a9
commit
afa9f66c27
1 changed files with 8 additions and 3 deletions
|
@ -508,9 +508,6 @@ krt_read_addr(struct ks_msg *msg)
|
||||||
memcpy(&ifa.brd, &ibrd, sizeof(ip_addr));
|
memcpy(&ifa.brd, &ibrd, sizeof(ip_addr));
|
||||||
|
|
||||||
scope = ipa_classify(ifa.ip);
|
scope = ipa_classify(ifa.ip);
|
||||||
|
|
||||||
ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen));
|
|
||||||
|
|
||||||
if (scope < 0)
|
if (scope < 0)
|
||||||
{
|
{
|
||||||
log(L_ERR "KIF: Invalid interface address %I for %s", ifa.ip, iface->name);
|
log(L_ERR "KIF: Invalid interface address %I for %s", ifa.ip, iface->name);
|
||||||
|
@ -518,6 +515,14 @@ krt_read_addr(struct ks_msg *msg)
|
||||||
}
|
}
|
||||||
ifa.scope = scope & IADDR_SCOPE_MASK;
|
ifa.scope = scope & IADDR_SCOPE_MASK;
|
||||||
|
|
||||||
|
if (iface->flags & IF_MULTIACCESS)
|
||||||
|
ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen));
|
||||||
|
else /* PtP iface */
|
||||||
|
{
|
||||||
|
ifa.flags |= IA_UNNUMBERED;
|
||||||
|
ifa.prefix = ifa.opposite = ifa.brd;
|
||||||
|
}
|
||||||
|
|
||||||
if (new)
|
if (new)
|
||||||
ifa_update(&ifa);
|
ifa_update(&ifa);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue