diff --git a/vpnsetup.sh b/vpnsetup.sh index 6c95f7d..23a1204 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -172,7 +172,7 @@ apt-get -yq install fail2ban || exiterr2 bigecho "Compiling and installing Libreswan..." -SWAN_VER=3.29 +SWAN_VER=3.31 swan_file="libreswan-$SWAN_VER.tar.gz" swan_url1="https://github.com/libreswan/libreswan/archive/v$SWAN_VER.tar.gz" swan_url2="https://download.libreswan.org/$swan_file" @@ -185,11 +185,15 @@ cd "libreswan-$SWAN_VER" || exit 1 cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS = USE_DNSSEC = false +USE_DH2 = true USE_DH31 = false USE_NSS_AVA_COPY = true USE_NSS_IPSEC_PROFILE = false USE_GLIBC_KERN_FLIP_HEADERS = true EOF +if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then + echo "USE_XFRM_INTERFACE_IFLA_HEADER = true" >> Makefile.inc.local +fi if [ "$(packaging/utils/lswan_detect.sh init)" = "systemd" ]; then apt-get -yq install libsystemd-dev || exiterr2 fi diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 29904c2..5ec9444 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -170,7 +170,7 @@ yum "$REPO1" -y install fail2ban || exiterr2 bigecho "Compiling and installing Libreswan..." -SWAN_VER=3.29 +SWAN_VER=3.31 swan_file="libreswan-$SWAN_VER.tar.gz" swan_url1="https://github.com/libreswan/libreswan/archive/v$SWAN_VER.tar.gz" swan_url2="https://download.libreswan.org/$swan_file" @@ -183,11 +183,15 @@ cd "libreswan-$SWAN_VER" || exit 1 cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS = USE_DNSSEC = false +USE_DH2 = true USE_DH31 = false USE_NSS_AVA_COPY = true USE_NSS_IPSEC_PROFILE = false USE_GLIBC_KERN_FLIP_HEADERS = true EOF +if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then + echo "USE_XFRM_INTERFACE_IFLA_HEADER = true" >> Makefile.inc.local +fi NPROCS=$(grep -c ^processor /proc/cpuinfo) [ -z "$NPROCS" ] && NPROCS=1 make "-j$((NPROCS+1))" -s base && make -s install-base