diff --git a/vpnsetup.sh b/vpnsetup.sh index 255d1c8..80e6c6d 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -69,6 +69,17 @@ if [ "$(id -u)" != 0 ]; then exiterr "Script must be run as root. Try 'sudo sh $0'" fi +case "$(uname -r)" in + 4.14*) + if [ "$(uname -m | cut -c1-3)" = "arm" ]; then + exiterr "Linux kernel 4.14 is not supported due to an xl2tpd bug." + fi + ;; + 4.15*) + exiterr "Linux kernel 4.15 is not supported due to an xl2tpd bug." + ;; +esac + net_iface=${VPN_NET_IFACE:-'eth0'} def_iface="$(route 2>/dev/null | grep '^default' | grep -o '[^ ]*$')" [ -z "$def_iface" ] && def_iface="$(ip -4 route list 0/0 2>/dev/null | grep -Po '(?<=dev )(\S+)')" diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index c3f5b04..465c03d 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -60,6 +60,14 @@ if [ "$(id -u)" != 0 ]; then exiterr "Script must be run as root. Try 'sudo sh $0'" fi +case "$(uname -r)" in + 4.15*) + if grep -qs "release 6" /etc/redhat-release; then + exiterr "Linux kernel 4.15 is not supported due to an xl2tpd bug." + fi + ;; +esac + net_iface=${VPN_NET_IFACE:-'eth0'} def_iface="$(route 2>/dev/null | grep '^default' | grep -o '[^ ]*$')" [ -z "$def_iface" ] && def_iface="$(ip -4 route list 0/0 2>/dev/null | grep -Po '(?<=dev )(\S+)')"