diff options
author | jim-p <jimp@pfsense.org> | 2013-09-27 13:11:17 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-09-27 13:14:04 -0400 |
commit | 93821aea2cfaa1b93890bdc3eafceadfc940d5cb (patch) | |
tree | e88eb8ae4bf897b8eb8f5e34525479a7e5473545 /etc/rc.newwanip | |
parent | bab13e1f72b89652d29d206fcbb2355276698564 (diff) | |
download | pfsense-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-x | etc/rc.newwanip | 4 |
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})."); |