diff options
| -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); |
