If rc.newwanip is run on an interface that should not have an IP address, do not take any action.

This commit is contained in:
jim-p 2013-09-27 13:11:17 -04:00
parent f58bfb932a
commit f3a4601c85

View File

@ -76,6 +76,10 @@ else {
$curwanip = find_interface_ip($interface_real, true);
if($curwanip == "")
$curwanip = get_interface_ip($interface);
if (($curwanip == "") && !(isset($config['interfaces'][$interface]['ipaddr']))) {
log_error("Interface does not have an IP address, nothing to do.");
return;
}
}
log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface}) (real interface: {$interface_real}).");