summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanip
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-xetc/rc.newwanip14
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index 201f085..806a75c 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -89,13 +89,17 @@ else {
log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real}).");
/*
- * NOTE: Take care of openvpn and similar if you generate the event to reconfigure an interface.
+ * NOTE: Take care of openvpn and no-ip interfaces or similar if you generate the event to reconfigure an interface.
* i.e. OpenVPN might be in tap mode and not have an ip.
*/
-if (($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) && substr($interface_real, 0, 4) != "ovpn") {
- log_error("rc.newwanip: Failed to update {$interface} IP, restarting...");
- send_event("interface reconfigure {$interface}");
- exit;
+if ($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) {
+ if (substr($interface_real, 0, 4) != "ovpn") {
+ if (!empty($config['interfaces'][$interface]['ipaddr'])) {
+ log_error("rc.newwanip: Failed to update {$interface} IP, restarting...");
+ send_event("interface reconfigure {$interface}");
+ exit;
+ }
+ }
}
/* XXX: This really possible? */
OpenPOWER on IntegriCloud