summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-06-21 00:28:50 +0000
committerErmal Luçi <eri@pfsense.org>2008-06-21 00:28:50 +0000
commitb6db92176273cdd9b1dfbf6b44b42e55a35ee7af (patch)
treedd6c6916b9443469466dfa3f1c09cd70f0a9a002 /etc/inc/interfaces.inc
parent19604f5d9680dad1a5e12d1bea8d7e5aa9f37193 (diff)
downloadpfsense-b6db92176273cdd9b1dfbf6b44b42e55a35ee7af.zip
pfsense-b6db92176273cdd9b1dfbf6b44b42e55a35ee7af.tar.gz
Continue interface improvements.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc18
1 files changed, 10 insertions, 8 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 2e263dc..d4c91b4 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -234,12 +234,14 @@ function interfaces_lan_configure() {
}
function interfaces_optional_configure() {
- global $config, $g;
- global $bridgeconfig;
+ global $g;
- for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
- interfaces_optional_configure_if($i);
- }
+ /* XXX: unify with wan when pppoe/pptp fixups are done. */
+ /* optional interface if list */
+ $iflist = get_configured_interface_list(true);
+
+ foreach($iflist as $if => $ifname)
+ interfaces_optional_configure_if($if);
if (!$g['booting']) {
/* reconfigure static routes (kernel may have deleted them) */
@@ -270,13 +272,13 @@ function interfaces_optional_configure_if($opti) {
$bridges_total = get_next_available_bridge_interface();
- $optcfg = $config['interfaces']['opt' . $opti];
+ $optcfg = $config['interfaces'][$opti];
if ($g['booting']) {
$optdescr = "";
if ($optcfg['descr'])
$optdescr = " ({$optcfg['descr']})";
- print "\tOPT{$opti}{$optdescr}... ";
+ print "\t{$opti}{$optdescr}... ";
}
if(file_exists("/tmp/{$optcfg['if']}_router"))
@@ -372,7 +374,7 @@ function interfaces_optional_configure_if($opti) {
} else {
/* if user has selected DHCP type then act accordingly */
if($optcfg['ipaddr'] == "dhcp") {
- interfaces_opt_dhcp_configure("opt{$opti}");
+ interfaces_opt_dhcp_configure($opti);
} else {
mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) . " " .
escapeshellarg($optcfg['ipaddr'] . "/" . $optcfg['subnet']));
OpenPOWER on IntegriCloud