From 0b86b9703290d84f74c84d230e8aea7751946304 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 23 Nov 2018 23:23:37 +0800 Subject: [PATCH] Fixed compilation failed and update libreswan version to 3.27. 1. Fixed the script failed to compile in the Ubuntu 18.04 x64, kernel 4.15.0-36-generic. 2. Update libreswan to 3.27, you may need to upload this version to your server. This fix was copy and modified from [hwdsl2/setup-ipsec-vpn](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/vpnsetup.sh#L199-L214). It is also used in [CentOS](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/vpnsetup_centos.sh#L199-L204). --- l2tp.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/l2tp.sh b/l2tp.sh index 4fbaaf0..8536d37 100644 --- a/l2tp.sh +++ b/l2tp.sh @@ -9,7 +9,7 @@ export PATH #=======================================================================# cur_dir=`pwd` -libreswan_filename="libreswan-3.20" +libreswan_filename="libreswan-3.27" download_root_url="http://dl.teddysun.com/files" rootness(){ @@ -421,7 +421,12 @@ compile_install(){ tar -zxf ${libreswan_filename}.tar.gz cd ${cur_dir}/l2tp/${libreswan_filename} - echo "WERROR_CFLAGS =" > Makefile.inc.local + cat > Makefile.inc.local <<'EOF' +WERROR_CFLAGS = +USE_DNSSEC = false +USE_DH31 = false +USE_GLIBC_KERN_FLIP_HEADERS = true +EOF make programs && make install /usr/local/sbin/ipsec --version >/dev/null 2>&1