From f3a4601c85c4de78caa4f12fefd64067fd83dbe8 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 27 Sep 2013 13:11:17 -0400 Subject: [PATCH] If rc.newwanip is run on an interface that should not have an IP address, do not take any action. --- etc/rc.newwanip | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/rc.newwanip b/etc/rc.newwanip index f9c23afcf1..beeb0b8d5d 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}).");