Skip to content

Commit

Permalink
rc: this looks suspicious, align with IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Apr 26, 2017
1 parent 97fb7d1 commit de1e979
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/etc/rc.newwanip
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,8 @@ log_error("On (IP address: {$curwanip}) (interface: {$interface_descr}[{$interfa
* i.e. OpenVPN might be in tap mode and not have an ip.
*/
if ((empty($curwanip) || !is_ipaddr($curwanip)) && substr($interface_real, 0, 4) != "ovpn") {
if (!empty($config['interfaces'][$interface]['ipaddr'])) {
log_error("Failed to update {$interface} IP, restarting...");
configd_run("interface reconfigure {$interface}");
return;
}
log_error("Failed to detect IP for {$interface_descr}[{$interface}]");
return;
}

$oldip = @file_get_contents("/var/db/{$interface}_cacheip");
Expand Down

0 comments on commit de1e979

Please sign in to comment.