summaryrefslogtreecommitdiff
path: root/scripts/vyatta-tunnel-dhcp.pl
diff options
context:
space:
mode:
authorCarl Byington <carl@five-ten-sg.com>2015-06-10 12:42:53 -0700
committerDaniil Baturin <daniil@baturin.org>2015-06-13 19:02:00 +0200
commit0d53445cf639a4072e6d2ecd71da6c9f1c78d4b8 (patch)
treebf7bccb7fda95f832c165ab9103f16708fd0e4cc /scripts/vyatta-tunnel-dhcp.pl
parent45e88676db35ed80a7d7868fe6eb189c43419d0c (diff)
downloadvyatta-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/vyatta-tunnel-dhcp.pl')
-rw-r--r--scripts/vyatta-tunnel-dhcp.pl5
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");