summaryrefslogtreecommitdiffstats
path: root/bfdd/ptm_adapter.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-03-26 15:02:00 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-05-07 15:54:30 +0200
commitb4335515957e9469ed7df30607a8200a80cc7ea2 (patch)
tree7621edfead43f5a9e1154b154cb4db73708b8fe5 /bfdd/ptm_adapter.c
parentbfdd: upon vrf enable/disable, update bs and obs list (diff)
downloadfrr-b4335515957e9469ed7df30607a8200a80cc7ea2.tar.xz
frr-b4335515957e9469ed7df30607a8200a80cc7ea2.zip
bfdd: check bfd on upon interface presence from separate vrf
if a separate vrf detects a new interface, then some bfd sessions may be run. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to '')
-rw-r--r--bfdd/ptm_adapter.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c
index abfb4e4a2..6d24c6420 100644
--- a/bfdd/ptm_adapter.c
+++ b/bfdd/ptm_adapter.c
@@ -563,15 +563,21 @@ static void bfdd_sessions_enable_interface(struct interface *ifp)
{
struct bfd_session_observer *bso;
struct bfd_session *bs;
+ struct vrf *vrf;
TAILQ_FOREACH(bso, &bglobal.bg_obslist, bso_entry) {
+ bs = bso->bso_bs;
if (bso->bso_isinterface == false)
continue;
-
/* Interface name mismatch. */
- bs = bso->bso_bs;
if (strcmp(ifp->name, bs->key.ifname))
continue;
+ vrf = vrf_lookup_by_id(ifp->vrf_id);
+ if (!vrf)
+ continue;
+ if (bs->key.vrfname[0] &&
+ strcmp(vrf->name, bs->key.vrfname))
+ continue;
/* Skip enabled sessions. */
if (bs->sock != -1)
continue;