Update IKEv2 script
- Improve check for MOBIKE support
This commit is contained in:
parent
c0a212bfc8
commit
91b7e53004
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -141,7 +141,6 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
y
|
y
|
||||||
ANSWERS
|
ANSWERS
|
||||||
|
|
||||||
@ -350,7 +349,6 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
y
|
y
|
||||||
ANSWERS
|
ANSWERS
|
||||||
|
|
||||||
|
@ -367,28 +367,38 @@ case $swan_ver in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if uname -m | grep -qi -e '^arm' -e '^aarch64'; then
|
if uname -m | grep -qi -e '^arm' -e '^aarch64'; then
|
||||||
mobike_support=0
|
modprobe -q configs
|
||||||
fi
|
if [ -f /proc/config.gz ]; then
|
||||||
|
if ! zcat /proc/config.gz | grep -q "CONFIG_XFRM_MIGRATE=y"; then
|
||||||
if [ "$mobike_support" = "1" ]; then
|
|
||||||
if [ "$in_container" = "0" ]; then
|
|
||||||
# Linux kernels on Ubuntu do not support MOBIKE
|
|
||||||
if [ "$os_type" = "ubuntu" ]; then
|
|
||||||
mobike_support=0
|
mobike_support=0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
kernel_conf="/boot/config-$(uname -r)"
|
||||||
|
if [ -f "$kernel_conf" ]; then
|
||||||
|
if ! grep -qs "CONFIG_XFRM_MIGRATE=y" "$kernel_conf"; then
|
||||||
|
mobike_support=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Linux kernels on Ubuntu do not support MOBIKE
|
||||||
|
if [ "$in_container" = "0" ]; then
|
||||||
|
if [ "$os_type" = "ubuntu" ] || uname -v | grep -qi ubuntu; then
|
||||||
|
mobike_support=0
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if uname -v | grep -qi ubuntu; then
|
||||||
|
mobike_support=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -n "Checking for MOBIKE support... "
|
echo -n "Checking for MOBIKE support... "
|
||||||
if [ "$mobike_support" = "1" ]; then
|
if [ "$mobike_support" = "1" ]; then
|
||||||
if [ "$in_container" = "0" ]; then
|
echo "available"
|
||||||
echo "yes"
|
|
||||||
else
|
|
||||||
echo "running in a container, see notes below"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "no"
|
echo "not available"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mobike_enable=0
|
mobike_enable=0
|
||||||
@ -396,7 +406,6 @@ if [ "$mobike_support" = "1" ]; then
|
|||||||
echo
|
echo
|
||||||
echo "The MOBIKE IKEv2 extension allows VPN clients to change network attachment points,"
|
echo "The MOBIKE IKEv2 extension allows VPN clients to change network attachment points,"
|
||||||
echo "e.g. switch between mobile data and Wi-Fi and keep the IPsec tunnel up on the new IP."
|
echo "e.g. switch between mobile data and Wi-Fi and keep the IPsec tunnel up on the new IP."
|
||||||
if [ "$in_container" = "0" ]; then
|
|
||||||
echo
|
echo
|
||||||
printf "Do you want to enable MOBIKE support? [Y/n] "
|
printf "Do you want to enable MOBIKE support? [Y/n] "
|
||||||
read -r response
|
read -r response
|
||||||
@ -408,20 +417,6 @@ if [ "$mobike_support" = "1" ]; then
|
|||||||
mobike_enable=0
|
mobike_enable=0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "IMPORTANT: *DO NOT* enable MOBIKE support, if your Docker host runs Ubuntu Linux."
|
|
||||||
printf "Do you want to enable MOBIKE support? [y/N] "
|
|
||||||
read -r response
|
|
||||||
case $response in
|
|
||||||
[yY][eE][sS]|[yY])
|
|
||||||
mobike_enable=1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
mobike_enable=0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user