diff options
author | Ermal LUÇI <eri@pfsense.org> | 2015-01-22 20:52:29 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2015-01-22 20:56:10 +0100 |
commit | 145eb9907c638f5a1cf279b480a69bb3556c3b7e (patch) | |
tree | 863937a4bc4028262ce2ecf2cd2233c79ee6fc25 /etc | |
parent | 8e24d1dacd80fd539cc9dd6a5f0a7c8953bcffd0 (diff) | |
download | pfsense-145eb9907c638f5a1cf279b480a69bb3556c3b7e.zip pfsense-145eb9907c638f5a1cf279b480a69bb3556c3b7e.tar.gz |
Fixes #4257 With the platform_booting() fixes a regression was done on openvpn tap interfaces or dynamic ones that are part of a bridge.RELENG_2_2_0
Allow during bootup rc.newwanip to continue up to a ceratin part to handle bridges or other complex interfaces.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.newwanip | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip index b533ae4..d992c71 100755 --- a/etc/rc.newwanip +++ b/etc/rc.newwanip @@ -43,10 +43,6 @@ require_once("openvpn.inc"); require_once("IPv6.inc"); require_once("rrd.inc"); -// Do not process while booting -if (platform_booting()) - return; - function restart_packages() { global $oldip, $curwanip, $g; @@ -89,7 +85,8 @@ else { $curwanip = get_interface_ip($interface); } -log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real})."); +if (!platform_booting()) + log_error("rc.newwanip: on (IP address: {$curwanip}) (interface: {$interface_descr}[{$interface}]) (real interface: {$interface_real})."); /* * NOTE: Take care of openvpn, no-ip or similar interfaces if you generate the event to reconfigure an interface. @@ -107,6 +104,8 @@ if ($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) { /* XXX: This really possible? */ if (empty($interface)) { + if (platform_booting()) + return; filter_configure(); restart_packages(); return; @@ -117,7 +116,8 @@ if (file_exists("{$g['vardb_path']}/{$interface}_cacheip")) $oldip = file_get_contents("{$g['vardb_path']}/{$interface}_cacheip"); /* regenerate resolv.conf if DNS overrides are allowed */ -system_resolvconf_generate(true); +if (!platform_booting()) + system_resolvconf_generate(true); /* write the current interface IP to file */ if (is_ipaddr($curwanip)) @@ -143,6 +143,10 @@ $bridgetmp = link_interface_to_bridge($interface); if (!empty($bridgetmp)) interface_bridge_add_member($bridgetmp, $interface_real); +// Do not process while booting +if (platform_booting()) + return; + /* make new hosts file */ system_hosts_generate(); |