Blame SOURCES/libreswan-4.3-maintain-different-v1v2-split.patch

09ee62
diff -Naur libreswan-4.3-orig/configs/d.ipsec.conf/ikev2.xml libreswan-4.3/configs/d.ipsec.conf/ikev2.xml
09ee62
--- libreswan-4.3-orig/configs/d.ipsec.conf/ikev2.xml	2021-02-21 12:03:03.000000000 -0500
09ee62
+++ libreswan-4.3/configs/d.ipsec.conf/ikev2.xml	2021-02-21 12:33:36.226284499 -0500
f301ee
@@ -1,15 +1,15 @@
f301ee
   <varlistentry>
f301ee
   <term><emphasis remap='B'>ikev2</emphasis></term>
f301ee
   <listitem>
f301ee
-<para>Whether to use IKEv1 (RFC 4301) or IKEv2 (RFC 7296) settings to be used.
f301ee
-Currently the accepted values are <emphasis remap='B'>no</emphasis>(the default),
f301ee
-signifying only IKEv1 is accepted, or <emphasis remap='B'>yes</emphasis>,
f301ee
+<para>Wether to use IKEv1 (RFC 4301) or IKEv2 (RFC 7296) as the Internet Key Exchange (IKE) protcol.
f301ee
+Currently the accepted values are <emphasis remap='B'>no</emphasis> (or <emphasis remap='B'>never</emphasis>)
f301ee
+signifying only IKEv1 is accepted, or <emphasis remap='B'>insist</emphasis>(the default),
f301ee
 signifying only IKEv2 is accepted. Previous versions allowed the keywords
f301ee
-<emphasis remap='B'>propose</emphasis> or <emphasis remap='B'>permit</emphasis>
f301ee
-that would allow either IKEv1 or IKEv2, but this is no longer supported. The
f301ee
-permit option is interpreted as no and the propose option is interpreted as
f301ee
-yes. Older versions also supported keyword
f301ee
-<emphasis remap='B'>insist</emphasis> which is now interpreted as yes.
f301ee
+<emphasis remap='B'>propose</emphasis>, <emphasis remap='B'>yes</emphasis> or <emphasis remap='B'>permit</emphasis>
f301ee
+that would allow either IKEv1 or IKEv2, but this is no longer supported and both options
f301ee
+now cause the connection to fail to load. <emphasis remap='B'>WARNING:</emphasis> This behaviour differs from upstream
f301ee
+libreswan, which only accepts <emphasis remap='B'>yes</emphasis> or <emphasis remap='B'>no</emphasis> where yes means
f301ee
+the same as insist.
f301ee
 </para>
f301ee
   </listitem>
f301ee
   </varlistentry>
09ee62
diff -Naur libreswan-4.3-orig/lib/libipsecconf/confread.c libreswan-4.3/lib/libipsecconf/confread.c
09ee62
--- libreswan-4.3-orig/lib/libipsecconf/confread.c	2021-02-21 12:03:03.000000000 -0500
09ee62
+++ libreswan-4.3/lib/libipsecconf/confread.c	2021-02-21 12:37:43.138031929 -0500
09ee62
@@ -1310,11 +1310,17 @@
f301ee
 
418cb8
 		switch (conn->options[KNCF_IKEv2]) {
418cb8
 		case fo_never:
418cb8
-		case fo_permit:
09ee62
 			conn->ike_version = IKEv1;
418cb8
 			break;
09ee62
 
418cb8
+		case fo_permit:
418cb8
+			starter_error_append(perrl, "ikev2=permit is no longer accepted. Use ikev2=insist or ikev2=no|never");
418cb8
+			return TRUE;
09ee62
+
418cb8
 		case fo_propose:
418cb8
+			starter_error_append(perrl, "ikev2=propose or ikev2=yes is no longer accepted. Use ikev2=insist or ikev2=no|never");
418cb8
+			return TRUE;
09ee62
+
418cb8
 		case fo_insist:
09ee62
 			conn->ike_version = IKEv2;
09ee62
 			break;
09ee62
diff -Naur libreswan-4.3-orig/programs/whack/whack.c libreswan-4.3/programs/whack/whack.c
09ee62
--- libreswan-4.3-orig/programs/whack/whack.c	2021-02-21 12:03:03.000000000 -0500
09ee62
+++ libreswan-4.3/programs/whack/whack.c	2021-02-21 12:39:27.066188354 -0500
09ee62
@@ -801,7 +801,7 @@
09ee62
 	{ "ikev1-allow", no_argument, NULL, CD_IKEv1 + OO }, /* obsolete name */
09ee62
 	{ "ikev2", no_argument, NULL, CD_IKEv2 +OO },
09ee62
 	{ "ikev2-allow", no_argument, NULL, CD_IKEv2 +OO }, /* obsolete name */
09ee62
-	{ "ikev2-propose", no_argument, NULL, CD_IKEv2 +OO }, /* obsolete, map onto allow */
09ee62
+	/* not in RHEL8 { "ikev2-propose", no_argument, NULL, CD_IKEv2 +OO }, */
f301ee
 
f301ee
 	PS("allow-narrowing", IKEV2_ALLOW_NARROWING),
09ee62
 #ifdef AUTH_HAVE_PAM
09ee62
@@ -1762,7 +1762,7 @@
09ee62
 			end_seen = LEMPTY;
09ee62
 			continue;
f301ee
 
09ee62
-		/* --ikev1 --ikev2 --ikev2-propose */
09ee62
+		/* --ikev1 --ikev2  */
09ee62
 		case CD_IKEv1:
09ee62
 		case CD_IKEv2:
09ee62
 		{