summaryrefslogtreecommitdiffstats
path: root/bfdd/ptm_adapter.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-06-24 01:46:39 +0200
committerGitHub <noreply@github.com>2019-06-24 01:46:39 +0200
commita36898e7555036c786f7aa944b848966b45d5897 (patch)
treefb34f0ca1836e09a8e89e73ebd6696a08b89b631 /bfdd/ptm_adapter.c
parentMerge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2 (diff)
downloadfrr-a36898e7555036c786f7aa944b848966b45d5897.tar.xz
frr-a36898e7555036c786f7aa944b848966b45d5897.zip
Revert "Ospf missing interface handling 2"
Diffstat (limited to 'bfdd/ptm_adapter.c')
-rw-r--r--bfdd/ptm_adapter.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c
index a634d923d..3e2ace6ea 100644
--- a/bfdd/ptm_adapter.c
+++ b/bfdd/ptm_adapter.c
@@ -572,10 +572,7 @@ static void bfdd_sessions_enable_interface(struct interface *ifp)
{
struct bfd_session_observer *bso;
struct bfd_session *bs;
- struct vrf *vrf = ifp->vrf;
-
- if (!vrf)
- return;
+ struct vrf *vrf;
TAILQ_FOREACH(bso, &bglobal.bg_obslist, bso_entry) {
bs = bso->bso_bs;
@@ -584,6 +581,9 @@ static void bfdd_sessions_enable_interface(struct interface *ifp)
/* Interface name mismatch. */
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;
@@ -698,14 +698,13 @@ static int bfdd_interface_update(ZAPI_CALLBACK_ARGS)
static int bfdd_interface_vrf_update(ZAPI_CALLBACK_ARGS)
{
struct interface *ifp;
- struct vrf *nvrf;
vrf_id_t nvrfid;
ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, &nvrfid);
if (ifp == NULL)
return 0;
- nvrf = vrf_lookup_by_id(nvrfid);
- if_update_to_new_vrf(ifp, nvrf);
+
+ if_update_to_new_vrf(ifp, nvrfid);
return 0;
}