[Bug] Mixed BFD session for peers with same IPv6 link-local addresses on different interfaces

Wang Shanker shankerwangmiao at gmail.com
Sat Oct 10 20:13:19 CEST 2020


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


More information about the Bird-users mailing list