diff options
author | Ermal <eri@pfsense.org> | 2014-04-30 18:41:12 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-04-30 18:41:12 +0000 |
commit | 4d076356d5442b68d9277ba5f30870f1eb24829a (patch) | |
tree | ceb0f9ceb9ee3d047330d9fae153ac3843a9c95e | |
parent | 6657d23cffd1a9176fed754cf1c2fede9d5a62dc (diff) | |
download | pfsense-4d076356d5442b68d9277ba5f30870f1eb24829a.zip pfsense-4d076356d5442b68d9277ba5f30870f1eb24829a.tar.gz |
Take care of interfaces that have no ip but might be part of the bridge as done for openvpn to avoid loops
-rwxr-xr-x | etc/rc.newwanip | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip index 201f085..806a75c 100755 --- a/etc/rc.newwanip +++ b/etc/rc.newwanip @@ -89,13 +89,17 @@ else { log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real})."); /* - * NOTE: Take care of openvpn and similar if you generate the event to reconfigure an interface. + * NOTE: Take care of openvpn and no-ip interfaces or similar if you generate the event to reconfigure an interface. * i.e. OpenVPN might be in tap mode and not have an ip. */ -if (($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) && substr($interface_real, 0, 4) != "ovpn") { - log_error("rc.newwanip: Failed to update {$interface} IP, restarting..."); - send_event("interface reconfigure {$interface}"); - exit; +if ($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) { + if (substr($interface_real, 0, 4) != "ovpn") { + if (!empty($config['interfaces'][$interface]['ipaddr'])) { + log_error("rc.newwanip: Failed to update {$interface} IP, restarting..."); + send_event("interface reconfigure {$interface}"); + exit; + } + } } /* XXX: This really possible? */ |