summaryrefslogtreecommitdiff
path: root/bfdd/ptm_adapter.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-10-22 01:17:40 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2021-11-22 20:47:23 +0300
commit096f7609f9168ad1a2503acad31d3afc8f00f9e5 (patch)
tree7acf9cbf0f944b032da6a796fcf8d7f6a06fe90a /bfdd/ptm_adapter.c
parentd32c92a4c0fcee71a8a6d02cb9ff84607cfdcc07 (diff)
*: cleanup ifp->vrf_id
Since f60a1188 we store a pointer to the VRF in the interface structure. There's no need anymore to store a separate vrf_id field. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'bfdd/ptm_adapter.c')
-rw-r--r--bfdd/ptm_adapter.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c
index 434d79c8f5..bf8f731d50 100644
--- a/bfdd/ptm_adapter.c
+++ b/bfdd/ptm_adapter.c
@@ -666,9 +666,7 @@ static void bfdd_sessions_enable_interface(struct interface *ifp)
struct bfd_session *bs;
struct vrf *vrf;
- vrf = vrf_lookup_by_id(ifp->vrf_id);
- if (!vrf)
- return;
+ vrf = ifp->vrf;
TAILQ_FOREACH(bso, &bglobal.bg_obslist, bso_entry) {
bs = bso->bso_bs;
@@ -767,8 +765,8 @@ void bfdd_sessions_disable_vrf(struct vrf *vrf)
static int bfd_ifp_destroy(struct interface *ifp)
{
if (bglobal.debug_zebra)
- zlog_debug("zclient: delete interface %s (VRF %u)", ifp->name,
- ifp->vrf_id);
+ zlog_debug("zclient: delete interface %s (VRF %s(%u))",
+ ifp->name, ifp->vrf->name, ifp->vrf->vrf_id);
bfdd_sessions_disable_interface(ifp);
@@ -837,8 +835,8 @@ static int bfdd_interface_address_update(ZAPI_CALLBACK_ARGS)
static int bfd_ifp_create(struct interface *ifp)
{
if (bglobal.debug_zebra)
- zlog_debug("zclient: add interface %s (VRF %u)", ifp->name,
- ifp->vrf_id);
+ zlog_debug("zclient: add interface %s (VRF %s(%u))", ifp->name,
+ ifp->vrf->name, ifp->vrf->vrf_id);
bfdd_sessions_enable_interface(ifp);
return 0;