mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-10-19 11:59:57 +00:00
Add work around for RFC3021 patch and its problem with certain IPv6 interfaces
addresses. It seems so far that netlink only ever returns IFA_ADDRESS for IPv6 interfaces and never IFA_LOCAL, regardless of whether it is PtP or not. Need to investigate precisely how IPv6 and netlink are supposed to behave wrt broadcast vs PtP links.
This commit is contained in:
parent
9a66800150
commit
8fdcfdecd5
@ -442,10 +442,15 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
|
|||||||
peeronly = if_is_pointopoint (ifp) ||
|
peeronly = if_is_pointopoint (ifp) ||
|
||||||
ifa->ifa_prefixlen >= IPV4_MAX_PREFIXLEN - 1;
|
ifa->ifa_prefixlen >= IPV4_MAX_PREFIXLEN - 1;
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
if (ifa->ifa_family == AF_INET6)
|
if (ifa->ifa_family == AF_INET6) {
|
||||||
peeronly = if_is_pointopoint (ifp) ||
|
peeronly = if_is_pointopoint (ifp) ||
|
||||||
ifa->ifa_prefixlen >= IPV6_MAX_PREFIXLEN - 1;
|
ifa->ifa_prefixlen >= IPV6_MAX_PREFIXLEN - 1;
|
||||||
|
}
|
||||||
#endif /* HAVE_IPV6*/
|
#endif /* HAVE_IPV6*/
|
||||||
|
if (!(tb[IFA_LOCAL] && tb[IFA_ADDRESS])) {
|
||||||
|
/* FIXME: IPv6 Appears to have only IFA_ADDRESS */
|
||||||
|
peeronly=0;
|
||||||
|
}
|
||||||
|
|
||||||
/* network. prefixlen applies to IFA_ADDRESS rather than IFA_LOCAL */
|
/* network. prefixlen applies to IFA_ADDRESS rather than IFA_LOCAL */
|
||||||
if (tb[IFA_ADDRESS] && !peeronly)
|
if (tb[IFA_ADDRESS] && !peeronly)
|
||||||
|
Loading…
Reference in New Issue
Block a user