diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-11-23 19:40:50 +0100 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-11-24 11:55:07 +0100 |
commit | ec62c60fc8b6b621258b9de0223d19f7e668b261 (patch) | |
tree | 772734b25064f36f609d0a94f25342674ac5ef79 /bfdd | |
parent | bfdd: support connecting to BFD data plane (diff) | |
download | frr-ec62c60fc8b6b621258b9de0223d19f7e668b261.tar.xz frr-ec62c60fc8b6b621258b9de0223d19f7e668b261.zip |
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 <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfd.c | 2 | ||||
-rw-r--r-- | bfdd/ptm_adapter.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 524989004..f7ce0ece3 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 90e2df236..44519c47b 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; } } |