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

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