diff options
author | Kim <kim.sidney@gmail.com> | 2019-03-14 16:25:08 +0100 |
---|---|---|
committer | UnicronNL <kim.sidney@gmail.com> | 2019-03-14 16:28:30 +0100 |
commit | bcdf0dead416fdc8e390ee3ba56fc5e7c6490e72 (patch) | |
tree | 95739272d866079199ee32fe2bb2e2d244f41d12 /scripts/vpn-config.pl | |
parent | 9900fb602e29b52e940ba7ee6eae3886b764fbfe (diff) | |
download | vyatta-cfg-vpn-bcdf0dead416fdc8e390ee3ba56fc5e7c6490e72.tar.gz vyatta-cfg-vpn-bcdf0dead416fdc8e390ee3ba56fc5e7c6490e72.zip |
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
Diffstat (limited to 'scripts/vpn-config.pl')
-rwxr-xr-x | scripts/vpn-config.pl | 5 |
1 files changed, 4 insertions, 1 deletions
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 =<<EOS; #!/bin/sh -/opt/vyatta/bin/sudo-users/vyatta-ipsec-dhcp.pl --interface=\"\$interface\" --new_ip=\"\$new_ip_address\" --reason=\"\$reason\" --old_ip=\"\$old_ip_address\" +/usr/libexec/vyos/system/vyatta-ipsec-dhcp.py --interface=\"\$interface\" --new_ip=\"\$new_ip_address\" --reason=\"\$reason\" --old_ip=\"\$old_ip_address\" EOS } my $hook = "/etc/dhcp/dhclient-exit-hooks.d/ipsecd"; |