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