summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2024-06-06 11:02:08 -0400
committerGitHub <noreply@github.com>2024-06-06 11:02:08 -0400
commit2a670d02c90e1c9263779dd71c126e6f08194d76 (patch)
tree7eeac49774cee0cf38c7affc8790df392bb209bd
parent3405d015d9414c71b19bccc9e3a693fadc2fa108 (diff)
parentd63b2d611a1926cd13a850ebe8dff130523da5fb (diff)
Merge pull request #16174 from Jafaral/nhrp-8.4
[8.4] nhrp: backport fixes #16141 and #16166
-rw-r--r--nhrpd/nhrp_cache.c2
-rw-r--r--nhrpd/nhrp_main.c4
-rw-r--r--nhrpd/nhrp_peer.c3
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);