diff options
Diffstat (limited to 'nhrpd/nhrp_interface.c')
| -rw-r--r-- | nhrpd/nhrp_interface.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c index f86dbe3d29..b348cc0def 100644 --- a/nhrpd/nhrp_interface.c +++ b/nhrpd/nhrp_interface.c @@ -464,16 +464,22 @@ void nhrp_interface_set_protection(struct interface *ifp, const char *profile, { struct nhrp_interface *nifp = ifp->info; - if (nifp->ipsec_profile) + if (nifp->ipsec_profile) { + vici_terminate_vc_by_profile_name(nifp->ipsec_profile); + nhrp_vc_reset(); free(nifp->ipsec_profile); + } nifp->ipsec_profile = profile ? strdup(profile) : NULL; - if (nifp->ipsec_fallback_profile) + if (nifp->ipsec_fallback_profile) { + vici_terminate_vc_by_profile_name(nifp->ipsec_fallback_profile); + nhrp_vc_reset(); free(nifp->ipsec_fallback_profile); + } nifp->ipsec_fallback_profile = fallback_profile ? strdup(fallback_profile) : NULL; - notifier_call(&nifp->notifier_list, NOTIFY_INTERFACE_ADDRESS_CHANGED); + notifier_call(&nifp->notifier_list, NOTIFY_INTERFACE_IPSEC_CHANGED); } void nhrp_interface_set_source(struct interface *ifp, const char *ifname) |
