diff options
Diffstat (limited to 'nhrpd/nhrp_interface.c')
| -rw-r--r-- | nhrpd/nhrp_interface.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c index 7768383e6b..269499cc59 100644 --- a/nhrpd/nhrp_interface.c +++ b/nhrpd/nhrp_interface.c @@ -49,6 +49,21 @@ static int nhrp_if_new_hook(struct interface *ifp) static int nhrp_if_delete_hook(struct interface *ifp) { + struct nhrp_interface *nifp = ifp->info; + + debugf(NHRP_DEBUG_IF, "Deleted interface (%s)", ifp->name); + + nhrp_cache_interface_del(ifp); + nhrp_nhs_interface_del(ifp); + nhrp_peer_interface_del(ifp); + + if (nifp->ipsec_profile) + free(nifp->ipsec_profile); + if (nifp->ipsec_fallback_profile) + free(nifp->ipsec_fallback_profile); + if (nifp->source) + free(nifp->source); + XFREE(MTYPE_NHRP_IF, ifp->info); return 0; } |
