diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index 5a16ae4..e592e5e 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -11,7 +11,7 @@ # know how you have improved it! # Specify which Libreswan version to install. See: https://libreswan.org -SWAN_VER=3.29 +SWAN_VER=3.31 ### DO NOT edit below this line ### @@ -46,14 +46,14 @@ if [ "$(id -u)" != 0 ]; then fi case "$SWAN_VER" in - 3.19|3.2[01235679]) + 3.19|3.2[01235679]|3.31) /bin/true ;; *) cat 1>&2 <> Makefile.inc.local + if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then + echo "USE_XFRM_INTERFACE_IFLA_HEADER = true" >> Makefile.inc.local + fi +fi if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then apt-get -yq install libsystemd-dev || exiterr2 fi @@ -260,7 +266,7 @@ elif [ "$dns_state" = "4" ]; then sed -i "s/modecfgdns=.*/modecfgdns1=$DNS_SRV1/" /etc/ipsec.conf fi -if [ "$SWAN_VER" = "3.29" ]; then +if [ "$SWAN_VER" = "3.29" ] || [ "$SWAN_VER" = "3.31" ]; then sed -i "/ikev2=never/d" /etc/ipsec.conf sed -i "/dpdaction=clear/a \ ikev2=never" /etc/ipsec.conf fi diff --git a/extras/vpnupgrade_centos.sh b/extras/vpnupgrade_centos.sh index c9c8783..1eb9308 100644 --- a/extras/vpnupgrade_centos.sh +++ b/extras/vpnupgrade_centos.sh @@ -11,7 +11,7 @@ # know how you have improved it! # Specify which Libreswan version to install. See: https://libreswan.org -SWAN_VER=3.29 +SWAN_VER=3.31 ### DO NOT edit below this line ### @@ -37,14 +37,14 @@ if [ "$(id -u)" != 0 ]; then fi case "$SWAN_VER" in - 3.19|3.2[01235679]) + 3.19|3.2[01235679]|3.31) /bin/true ;; *) cat 1>&2 <> Makefile.inc.local + if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then + echo "USE_XFRM_INTERFACE_IFLA_HEADER = true" >> Makefile.inc.local + fi +fi NPROCS=$(grep -c ^processor /proc/cpuinfo) [ -z "$NPROCS" ] && NPROCS=1 make "-j$((NPROCS+1))" -s base && make -s install-base @@ -267,7 +273,7 @@ elif [ "$dns_state" = "4" ]; then sed -i "s/modecfgdns=.*/modecfgdns1=$DNS_SRV1/" /etc/ipsec.conf fi -if [ "$SWAN_VER" = "3.29" ]; then +if [ "$SWAN_VER" = "3.29" ] || [ "$SWAN_VER" = "3.31" ]; then sed -i "/ikev2=never/d" /etc/ipsec.conf sed -i "/dpdaction=clear/a \ ikev2=never" /etc/ipsec.conf fi