From ec62c60fc8b6b621258b9de0223d19f7e668b261 Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Mon, 23 Nov 2020 15:40:50 -0300 Subject: [PATCH] bfdd: move interface/vrf reset code Don't reset interface/vrf pointer everytime a session is disabled instead only do it when it was explicitly removed. Signed-off-by: Rafael Zalamena --- bfdd/bfd.c | 2 -- bfdd/ptm_adapter.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 5249890043..f7ce0ece3e 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -409,8 +409,6 @@ void bfd_session_disable(struct bfd_session *bs) bfd_recvtimer_delete(bs); bfd_xmttimer_delete(bs); ptm_bfd_echo_stop(bs); - bs->vrf = NULL; - bs->ifp = NULL; /* Set session down so it doesn't report UP and disabled. */ ptm_bfd_sess_dn(bs, BD_PATH_DOWN); diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c index 90e2df2367..44519c47b5 100644 --- a/bfdd/ptm_adapter.c +++ b/bfdd/ptm_adapter.c @@ -703,7 +703,7 @@ static void bfdd_sessions_disable_interface(struct interface *ifp) continue; bfd_session_disable(bs); - + bs->ifp = NULL; } } @@ -752,6 +752,7 @@ void bfdd_sessions_disable_vrf(struct vrf *vrf) continue; bfd_session_disable(bs); + bs->vrf = NULL; } } -- 2.39.5