diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-11-23 15:40:50 -0300 | 
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-11-24 07:55:07 -0300 | 
| commit | ec62c60fc8b6b621258b9de0223d19f7e668b261 (patch) | |
| tree | 772734b25064f36f609d0a94f25342674ac5ef79 /bfdd | |
| parent | 6655b43d512faffc75a72de6e3df02415b0af709 (diff) | |
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 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;  	}  }  | 
