diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index 0e89194..ce572e2 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -169,13 +169,19 @@ fi cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w USE_DNSSEC=false +EOF +if [ "$SWAN_VER" != "4.1" ]; then +cat >> Makefile.inc.local <<'EOF' USE_DH31=false USE_NSS_AVA_COPY=true USE_NSS_IPSEC_PROFILE=false USE_GLIBC_KERN_FLIP_HEADERS=true EOF +fi if [ "$SWAN_VER" = "3.31" ] || [ "$SWAN_VER" = "3.32" ] || [ "$SWAN_VER" = "4.1" ]; then echo "USE_DH2=true" >> Makefile.inc.local +fi +if [ "$SWAN_VER" = "3.31" ] || [ "$SWAN_VER" = "3.32" ]; then if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then echo "USE_XFRM_INTERFACE_IFLA_HEADER=true" >> Makefile.inc.local fi diff --git a/extras/vpnupgrade_centos.sh b/extras/vpnupgrade_centos.sh index 25a6f85..ff07cb6 100644 --- a/extras/vpnupgrade_centos.sh +++ b/extras/vpnupgrade_centos.sh @@ -177,11 +177,15 @@ fi cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w USE_DNSSEC=false +EOF +if [ "$SWAN_VER" != "4.1" ]; then +cat >> Makefile.inc.local <<'EOF' USE_DH31=false USE_NSS_AVA_COPY=true USE_NSS_IPSEC_PROFILE=false USE_GLIBC_KERN_FLIP_HEADERS=true EOF +fi if [ "$SWAN_VER" = "3.31" ] || [ "$SWAN_VER" = "3.32" ] || [ "$SWAN_VER" = "4.1" ]; then echo "USE_DH2=true" >> Makefile.inc.local if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then diff --git a/vpnsetup.sh b/vpnsetup.sh index a9527dc..a42c0cd 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -197,16 +197,9 @@ cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w 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 USE_NSS_KDF=false FINALNSSDIR=/etc/ipsec.d 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 907bc97..06e1715 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -194,10 +194,6 @@ cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w 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 USE_NSS_KDF=false FINALNSSDIR=/etc/ipsec.d EOF