[Bug] Mixed BFD session for peers with same IPv6 link-local addresses on different interfaces
Hi, all In bird, BFD sessions are distinguished only by their peers' address, so if multiple routing protocols request BFD session for the same neighbor, they can share and be controlled by one session. Normally it won't be a problem. However, it is not the case when it come to the IPv6 link-local addresses. Since fe80:: addresses are link-local, the same address on different interfaces refers to different nodes. So when requesting BFD sessions for neighbors with link-local address, the destination interface should also be considered. This issue can be reproduced by the following configuration with the latest commit in legacy branch, and a similar configuration with the latest commit in master branch: ``` router id 192.168.0.1; protocol bfd bfd1{ interface "eth*"; }; protocol device { }; protocol static { route 2001:db8::/32 multipath via fe80::1%eth0 bfd via fe80::1%eth1 bfd ; }; ``` As shown in `show bfd session`, only one BFD session is created: ``` # ./birdc sh bfd sess BIRD 1.6.8 ready. bfd1: IP address Interface State Since Interval Timeout fe80::1 eth0 Down 01:33:24 1.000 0.000 ``` Expected behavior: two BFD sessions are created with both routers on both interfaces. Cheers, Miao Wang
On Sun, Oct 11, 2020 at 02:13:19AM +0800, Wang Shanker wrote:
Hi, all
In bird, BFD sessions are distinguished only by their peers' address, so if multiple routing protocols request BFD session for the same neighbor, they can share and be controlled by one session. Normally it won't be a problem. However, it is not the case when it come to the IPv6 link-local addresses.
Since fe80:: addresses are link-local, the same address on different interfaces refers to different nodes. So when requesting BFD sessions for neighbors with link-local address, the destination interface should also be considered.
This issue can be reproduced by the following configuration with the latest commit in legacy branch, and a similar configuration with the latest commit in master branch:
Hi (Noticed while looking for some missed / forgotten e-mails) Thanks for the bugreport, fixed here (with contribution from Sebastian Hahn): https://gitlab.nic.cz/labs/bird/-/commit/910adaa08bbd416288797505399ab47f990... -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (2)
-
Ondrej Zajicek -
Wang Shanker