summaryrefslogtreecommitdiffstats
path: root/bfdd
diff options
context:
space:
mode:
Diffstat (limited to 'bfdd')
-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;