bfd does not work in a vrf

Alexander Zubkov green at qrator.net
Wed Jul 17 12:05:49 CEST 2019


Hello,

I made small fix for myself, that allow bfd to work in one VRF,
defined in the configuration:

--- a/proto/bfd/packets.c
+++ b/proto/bfd/packets.c
@@ -413,6 +413,7 @@ bfd_open_rx_sk(struct bfd_proto *p, int multihop, int af)
   sk->type = SK_UDP;
   sk->subtype = af;
   sk->sport = !multihop ? BFD_CONTROL_PORT : BFD_MULTI_CTL_PORT;
+  sk->vrf = p->p.vrf;
   sk->data = p;

   sk->rbsize = BFD_MAX_LEN;

It works, but I suppose vrf change should be handled somehow in
bfd_reconfigure also. Not sure if reopening socket is enough or it
would be better to call bfd_shutdown() and bfd_start().

On Tue, Jul 16, 2019 at 3:40 PM Ondrej Zajicek <santiago at crfreenet.org> wrote:
>
> Hello
>
> Yes, this is currently not implemented properly, i forgot about it.
> Would require some substantial work. There are two possibilities:
>
> - Multiple BFD instances, each in VRF, with proper dispatch of BFD
> requests to instances based on VRF.
>
> - One BFD instance, with multiple listening sockets, each with
> appropriate VRF. That would require more work.
>
> --
> Elen sila lumenn' omentielvo
>
> Ondrej 'Santiago' Zajicek (email: santiago at 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."


More information about the Bird-users mailing list