diff options
author | Carl Byington <carl@five-ten-sg.com> | 2015-06-10 12:42:53 -0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-06-13 19:02:00 +0200 |
commit | 0d53445cf639a4072e6d2ecd71da6c9f1c78d4b8 (patch) | |
tree | bf7bccb7fda95f832c165ab9103f16708fd0e4cc /scripts | |
parent | 45e88676db35ed80a7d7868fe6eb189c43419d0c (diff) | |
download | vyatta-cfg-system-0d53445cf639a4072e6d2ecd71da6c9f1c78d4b8.tar.gz vyatta-cfg-system-0d53445cf639a4072e6d2ecd71da6c9f1c78d4b8.zip |
dhcp bound/reboot must ignore old values
Signed-off-by: Daniil Baturin <daniil@baturin.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vyatta-tunnel-dhcp.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/vyatta-tunnel-dhcp.pl b/scripts/vyatta-tunnel-dhcp.pl index 4283b30a..cc51483d 100644 --- a/scripts/vyatta-tunnel-dhcp.pl +++ b/scripts/vyatta-tunnel-dhcp.pl @@ -11,7 +11,10 @@ GetOptions("interface=s" => \$iface, "reason=s" => \$reason); # check if an update is needed -exit(0) if (($iface ne $dhcp) || ($oip eq $nip) || ($reason ne "BOUND")); +if (($reason eq "BOUND") || ($reason eq "REBOOT")) { + $oip = ""; +} +exit(0) if (($iface ne $dhcp) || ($oip eq $nip)); logger("DHCP address on $iface updated to $nip from $oip: Updating tunnel $tunnel configuration."); system("sudo ip tunnel change $tunnel local $nip"); |