bfd does not work in a vrf
Ondrej Zajicek
santiago at crfreenet.org
Wed Jul 17 14:47:30 CEST 2019
On Wed, Jul 17, 2019 at 12:05:49PM +0200, Alexander Zubkov wrote:
> 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
Hello
This would work, it is necessary to also set sk->vrf for bfd_open_tx_sk()
foir multihop BFD. It is not necessary to handle it in bfd_reconfigure(),
as VRF change is handled in generic code in proto_reconfigure().
I also just implemented BFD request dispatch based on VRFs to handle multiple
VRFs and multiple BFD instances.
--
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