summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanip
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-09-27 13:11:17 -0400
committerjim-p <jimp@pfsense.org>2013-09-27 13:14:04 -0400
commit93821aea2cfaa1b93890bdc3eafceadfc940d5cb (patch)
treee88eb8ae4bf897b8eb8f5e34525479a7e5473545 /etc/rc.newwanip
parentbab13e1f72b89652d29d206fcbb2355276698564 (diff)
downloadpfsense-93821aea2cfaa1b93890bdc3eafceadfc940d5cb.zip
pfsense-93821aea2cfaa1b93890bdc3eafceadfc940d5cb.tar.gz
If rc.newwanip is run on an interface that should not have an IP address, do not take any action.
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-xetc/rc.newwanip4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index f9c23af..beeb0b8 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -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}).");
OpenPOWER on IntegriCloud