ipsec: TTL only applies for GRE interfaces and not VTI

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2019-01-09 19:56:01 +01:00
parent 54bac01402
commit 6a45a1f101

View File

@@ -83,13 +83,19 @@ main() {
local args=(
"local" "${vpn_ip}"
"remote" "${righthost}"
"ttl" "255"
)
# Add key for VTI
if [ "${interface_mode}" = "vti" ]; then
args+=( key "${id}" )
fi
case "${interface_mode}" in
gre)
# Add TTL
args+=( "ttl" "255" )
;;
vti)
# Add key for VTI
args+=( "key" "${id}" )
;;
esac
# Update the settings when the interface already exists
if [ -d "/sys/class/net/${intf}" ]; then