mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 20:34:33 +00:00
Merge pull request #3299 from opensourcerouting/fix-bfd-ipv6-unnumbered
bfdd: fix BGP unnumbered peer setup
This commit is contained in:
commit
24e23cbc44
@ -381,6 +381,21 @@ static int _ptm_msg_read(struct stream *msg, int command,
|
|||||||
if (bpc->bpc_has_localif) {
|
if (bpc->bpc_has_localif) {
|
||||||
STREAM_GET(bpc->bpc_localif, msg, ifnamelen);
|
STREAM_GET(bpc->bpc_localif, msg, ifnamelen);
|
||||||
bpc->bpc_localif[ifnamelen] = 0;
|
bpc->bpc_localif[ifnamelen] = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IPv6 link-local addresses must use scope id,
|
||||||
|
* otherwise the session lookup will always fail
|
||||||
|
* and we'll have multiple sessions showing up.
|
||||||
|
*
|
||||||
|
* This problem only happens with single hop
|
||||||
|
* since it is not possible to have link-local
|
||||||
|
* address for multi hop sessions.
|
||||||
|
*/
|
||||||
|
if (bpc->bpc_ipv4 == false
|
||||||
|
&& IN6_IS_ADDR_LINKLOCAL(
|
||||||
|
&bpc->bpc_peer.sa_sin6.sin6_addr))
|
||||||
|
bpc->bpc_peer.sa_sin6.sin6_scope_id =
|
||||||
|
ptm_bfd_fetch_ifindex(bpc->bpc_localif);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user