From bcdf0dead416fdc8e390ee3ba56fc5e7c6490e72 Mon Sep 17 00:00:00 2001 From: Kim Date: Thu, 14 Mar 2019 16:25:08 +0100 Subject: Fixes T1298 use vti tunnel with ipsec and dhcp. * make dhcp interface work for vti interfaces * clean up code, loger timeout use python api * change vti tunnel ip on new dhcp lease * only change ip on up and do not get non dhcp ip * fix error in function, include up-host and down-host --- scripts/vpn-config.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/vpn-config.pl') diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index ace33e8..d68e419 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -1078,6 +1078,9 @@ if ($vcVPN->exists('ipsec')) { vpn_die(["vpn","ipsec","site-to-site","peer",$peer,"vti","bind"],"$vpn_cfg_err No interface bind specified for peer \"$peer\" vti\n"); } $genout .= "\tleftupdown=\"/usr/lib/ipsec/vti-up-down $tunName\"\n"; + if (defined($dhcp_iface)){ + $dhcp_if = $dhcp_if + 1; + } } # @@ -1522,7 +1525,7 @@ sub dhcp_hook { if ($dhcp_iface > 0){ $str =<