summaryrefslogtreecommitdiff
path: root/proto/bfd/packets.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-17 16:20:35 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-17 16:20:35 +0200
commitcf7ff99513728e4e405508e5ccd7522289d4ec82 (patch)
tree628cf52de928cb52340b82c1e19ae1d2d2d21ba8 /proto/bfd/packets.c
parent2eaf65ec607b68748744fa8e0d596cf1f3ba117a (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 6d5151ea..703c6e28 100644
--- 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;
@@ -444,6 +445,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;