summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-29 08:10:33 +0000
committerErmal <eri@pfsense.org>2013-01-29 08:10:33 +0000
commita823022d6126207d8e045093fe1b823bd5d1783d (patch)
tree3d88a02a2f680c24a69fb384a3b9c614b2b46b2b /etc
parentb73a96b68d1d4e919a268d2e8e3a6ec902709e6d (diff)
downloadpfsense-a823022d6126207d8e045093fe1b823bd5d1783d.zip
pfsense-a823022d6126207d8e045093fe1b823bd5d1783d.tar.gz
Do not do so much work during boot since all interfaces will be called for configuration no need to go and find those. Also delay tracking interfaces during config to give a chance their parents to come up
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc31
1 files changed, 20 insertions, 11 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 8d40c1c..fcefdb7 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -957,6 +957,8 @@ function interfaces_configure() {
else if (strstr($realif, "ovpn")) {
//echo "Delaying OpenVPN interface configuration...done.\n";
continue;
+ } else if (!empty($config['interfaces'][$if]['ipaddrv6']) && $config['interfaces'][$if]['ipaddrv6'] == "track6") {
+ $delayed_list[$if] = $ifname;
} else {
if ($g['booting'])
printf(gettext("Configuring %s interface..."), $ifname);
@@ -3161,11 +3163,14 @@ function interface_6rd_configure($interface = "wan") {
mwexec("/sbin/route change -host " . $wancfg['gateway-6rd'] . " {$ip4gateway}");
/* configure dependent interfaces */
- /* XXX: Really necessary? */
- $iflist = get_configured_interface_with_descr(false, true);
- foreach($iflist as $if => $ifname) {
- if ($config['interfaces'][$if]['track6-interface'] == $interface)
- interface_track6_configure($if);
+ if (!$g['booting']) {
+ /* XXX: Really necessary? */
+ $iflist = get_configured_interface_with_descr(false, true);
+ foreach($iflist as $if => $ifname) {
+ if ($config['interfaces'][$if]['track6-interface'] == $interface)
+ interface_track6_configure($if);
+ }
+ unset($iflist);
}
return 0;
@@ -3173,7 +3178,6 @@ function interface_6rd_configure($interface = "wan") {
function interface_6to4_configure($interface = "wan"){
global $config, $g;
- $iflist = get_configured_interface_with_descr(false, true);
/* because this is a tunnel interface we can only function
* with a public IPv4 address on the interface */
@@ -3260,10 +3264,14 @@ function interface_6to4_configure($interface = "wan"){
mwexec("route change -host 192.88.99.1 {$ip4gateway}");
}
- /* configure dependent interfaces */
- foreach($iflist as $if => $ifname) {
- if($config['interfaces'][$if]['track6-interface'] == $interface)
- interface_track6_configure($if);
+ if (!$g['booting']) {
+ /* configure dependent interfaces */
+ $iflist = get_configured_interface_with_descr(false, true);
+ foreach($iflist as $if => $ifname) {
+ if($config['interfaces'][$if]['track6-interface'] == $interface)
+ interface_track6_configure($if);
+ }
+ unset($iflist);
}
return 0;
@@ -3315,6 +3323,7 @@ function interface_dhcpv6_configure($interface = "wan") {
$dhcp6cconf .= " };\n";
}
}
+ unset($iflist);
$dhcp6cconf .= "};\n";
}
}
@@ -3367,7 +3376,7 @@ function interface_dhcpv6_configure($interface = "wan") {
}
}
/* worst case is that the rc.newwanipv6 handles setting up the track6 interface */
- if ($wancfg['ippaddrv6'] != "slaac") {
+ if (!$g['booting'] && $wancfg['ippaddrv6'] != "slaac") {
/* configure dependent interfaces */
/* XXX: Really necessary? */
$iflist = get_configured_interface_with_descr(false, true);
OpenPOWER on IntegriCloud