summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrp_interface.c
diff options
context:
space:
mode:
authorGaurav Goyal <gaurav.goyal@4rf.com>2021-02-04 04:08:08 +0100
committerReuben Dowle <reuben.dowle@4rf.com>2021-03-17 05:03:47 +0100
commit58ef1668ae45613dae36ca2e11a717236a3e4399 (patch)
tree9e1def5a14b9643c30335803757442be2ad5243b /nhrpd/nhrp_interface.c
parentnhrpd: Make comments clearer, fix style issues (diff)
downloadfrr-58ef1668ae45613dae36ca2e11a717236a3e4399.tar.xz
frr-58ef1668ae45613dae36ca2e11a717236a3e4399.zip
nhrpd: When IPsec profile is added or deleted, reset the vc and re-check peer
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
Diffstat (limited to 'nhrpd/nhrp_interface.c')
-rw-r--r--nhrpd/nhrp_interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c
index 9f531cf6b..b348cc0de 100644
--- a/nhrpd/nhrp_interface.c
+++ b/nhrpd/nhrp_interface.c
@@ -466,18 +466,20 @@ void nhrp_interface_set_protection(struct interface *ifp, const char *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) {
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)