mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 01:42:58 +02:00
ipsec: TTL only applies for GRE interfaces and not VTI
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user