On Sun, Mar 04, 2018 at 07:50:13PM +0100, Julian Brost wrote:
Hi,
I just tried to enable BFD for some OSPF and BGP connections and ran into an issue which BFD sessions flapping up and down and Bird logging many messages like these:
bfd1: Bad packet from fe80::2 - unknown session id (130079069) bfd1: Bad packet from fe80::2 - unknown session id (3102513000) bfd1: Bad packet from fe80::2 - unknown session id (3650438750) bfd1: Bad packet from fe80::2 - unknown session id (1597034259)
This presumably happens due to this piece of code in bfd_rx_hook() in proto/bfd/packets.c:
s = bfd_find_session_by_addr(p, sk->faddr);
I use fe80::1/fe80::2 as addresses for most of my IPv6 peering connections and sk->faddr is just a 128 bit value, so it contains no interface identifier, which likely leads to Bird confusing multiple BFD sessions.
Hi Thanks for the bugreport. You are right, BFD sessions are dispatched just based on source address regardless of interface, so it is confused by conflicting link-local addresses. We will fix that, i would expect the same issue could happen when conflicting private IPs are used in different VRFs. -- 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."