summaryrefslogtreecommitdiff
path: root/proto/bfd/packets.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-18 02:04:42 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-18 02:04:42 +0200
commitf9deedf1f045d1b64edaf2f27209e5227cce155a (patch)
treecd092a8b499d79be68ee22cb5981154811ed8021 /proto/bfd/packets.c
parent9ff6c8d83c7fee5f354d4d6ed4efc15bfc6bc7e1 (diff)
BFD: Support for VRFs
Allow multiple BFD instances in separate VRFs, dispatch BFD requests according to VRFs. Thanks to Alexander Zubkov for notice and patches.
Diffstat (limited to 'proto/bfd/packets.c')
-rw-r--r--proto/bfd/packets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/proto/bfd/packets.c b/proto/bfd/packets.c
index f577ed31..08c6c508 100644
--- a/proto/bfd/packets.c
+++ b/proto/bfd/packets.c
@@ -412,6 +412,7 @@ bfd_open_rx_sk(struct bfd_proto *p, int multihop)
sock *sk = sk_new(p->tpool);
sk->type = SK_UDP;
sk->sport = !multihop ? BFD_CONTROL_PORT : BFD_MULTI_CTL_PORT;
+ sk->vrf = p->p.vrf;
sk->data = p;
sk->rbsize = BFD_MAX_LEN;
@@ -447,6 +448,7 @@ bfd_open_tx_sk(struct bfd_proto *p, ip_addr local, struct iface *ifa)
sk->saddr = local;
sk->dport = ifa ? BFD_CONTROL_PORT : BFD_MULTI_CTL_PORT;
sk->iface = ifa;
+ sk->vrf = p->p.vrf;
sk->data = p;
sk->tbsize = BFD_MAX_LEN;