diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2024-06-06 11:02:18 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-06 11:02:18 -0400 | 
| commit | c6f11f8d75175e6ea1dcc5661e1f5b13bbc00d2c (patch) | |
| tree | aca1547476043debcb2e278f2e79a11b2a9bdf13 | |
| parent | 2e867bffed23fd4d5d4a547dcfd9fe1ca8955a17 (diff) | |
| parent | 57c1a5989df3e02bc539c137890bfb8ea49a6bd2 (diff) | |
Merge pull request #16173 from Jafaral/nhrp-8.5
[8.5] nhrp: backport fixes #16141 and #16166
| -rw-r--r-- | nhrpd/nhrp_cache.c | 2 | ||||
| -rw-r--r-- | nhrpd/nhrp_main.c | 4 | ||||
| -rw-r--r-- | nhrpd/nhrp_peer.c | 3 | 
3 files changed, 6 insertions, 3 deletions
diff --git a/nhrpd/nhrp_cache.c b/nhrpd/nhrp_cache.c index 81d9bb255f..5f3e457e31 100644 --- a/nhrpd/nhrp_cache.c +++ b/nhrpd/nhrp_cache.c @@ -74,6 +74,8 @@ static void nhrp_cache_free(struct nhrp_cache *c)  	notifier_call(&c->notifier_list, NOTIFY_CACHE_DELETE);  	assert(!notifier_active(&c->notifier_list));  	hash_release(nifp->cache_hash, c); +	if (c->cur.peer) +		nhrp_peer_notify_del(c->cur.peer, &c->peer_notifier);  	THREAD_OFF(c->t_timeout);  	THREAD_OFF(c->t_auth);  	XFREE(MTYPE_NHRP_CACHE, c); diff --git a/nhrpd/nhrp_main.c b/nhrpd/nhrp_main.c index bece89ca79..5515b45f39 100644 --- a/nhrpd/nhrp_main.c +++ b/nhrpd/nhrp_main.c @@ -87,13 +87,13 @@ static void nhrp_request_stop(void)  	debugf(NHRP_DEBUG_COMMON, "Exiting...");  	frr_early_fini(); -	nhrp_shortcut_terminate(); +	vrf_terminate();  	nhrp_nhs_terminate();  	nhrp_zebra_terminate();  	vici_terminate();  	evmgr_terminate();  	nhrp_vc_terminate(); -	vrf_terminate(); +	nhrp_shortcut_terminate();  	debugf(NHRP_DEBUG_COMMON, "Done.");  	frr_fini(); diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c index e7f2eaf5a7..e5e75dfea4 100644 --- a/nhrpd/nhrp_peer.c +++ b/nhrpd/nhrp_peer.c @@ -49,7 +49,8 @@ static void nhrp_peer_check_delete(struct nhrp_peer *p)  	THREAD_OFF(p->t_fallback);  	THREAD_OFF(p->t_timer); -	hash_release(nifp->peer_hash, p); +	if (nifp->peer_hash) +		hash_release(nifp->peer_hash, p);  	nhrp_interface_notify_del(p->ifp, &p->ifp_notifier);  	nhrp_vc_notify_del(p->vc, &p->vc_notifier);  	XFREE(MTYPE_NHRP_PEER, p);  | 
