Blame SOURCES/libreswan-3.25-1724200-halfopen-shunt.patch

77b34d
diff -Naur libreswan-3.25-orig/programs/pluto/state.c libreswan-3.25/programs/pluto/state.c
77b34d
--- libreswan-3.25-orig/programs/pluto/state.c	2019-07-03 15:52:47.246474906 -0400
77b34d
+++ libreswan-3.25/programs/pluto/state.c	2019-07-03 15:54:37.671850020 -0400
77b34d
@@ -1101,7 +1101,8 @@
77b34d
 #endif
77b34d
 
77b34d
 	/* If we are failed OE initiator, make shunt bare */
77b34d
-	if (IS_IKE_SA(st) && (c->policy & POLICY_OPPORTUNISTIC) &&
77b34d
+	if (IS_IKE_SA(st) && c->newest_isakmp_sa == st->st_serialno &&
77b34d
+		(c->policy & POLICY_OPPORTUNISTIC) &&
77b34d
 	    (st->st_state == STATE_PARENT_I1 || st->st_state == STATE_PARENT_I2)) {
77b34d
 		ipsec_spi_t failure_shunt = shunt_policy_spi(c, FALSE /* failure_shunt */);
77b34d
 		ipsec_spi_t nego_shunt = shunt_policy_spi(c, TRUE /* negotiation shunt */);