From 6c9ca5876623d3b1e36a3e5684523d9d57845038 Mon Sep 17 00:00:00 2001 From: Gaurav Goyal Date: Fri, 27 Nov 2020 15:41:09 +1300 Subject: [PATCH] nhrpd: Only create one child sa In some circumstances, especicially when GRE tunnel interface does not exist, repeated child sa requests are sent. Prevent this by only sending another request if the child sa does not exist Signed-off-by: Reuben Dowle --- nhrpd/nhrp_peer.c | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 nhrpd/nhrp_peer.c diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c old mode 100644 new mode 100755 index 2dc019ce65..85d7477aa3 --- a/nhrpd/nhrp_peer.c +++ b/nhrpd/nhrp_peer.c @@ -271,6 +271,8 @@ int nhrp_peer_check(struct nhrp_peer *p, int establish) return 0; if (sockunion_family(&vc->local.nbma) == AF_UNSPEC) return 0; + if (vc->ipsec) + return 1; p->prio = establish > 1; p->requested = 1; -- 2.39.5