From 0d53445cf639a4072e6d2ecd71da6c9f1c78d4b8 Mon Sep 17 00:00:00 2001 From: Carl Byington Date: Wed, 10 Jun 2015 12:42:53 -0700 Subject: dhcp bound/reboot must ignore old values Signed-off-by: Daniil Baturin --- scripts/vyatta-tunnel-dhcp.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.3