summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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");