diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-11-05 20:18:52 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-11-05 20:18:52 +0000 |
commit | 31241000c625268eb7c84f086652b507538d74a2 (patch) | |
tree | fa489f81f9f711324d52d867091ed0ed9c951611 /etc | |
parent | a2eb0b3d5e938487ccf441d929df5e160463617c (diff) | |
download | pfsense-31241000c625268eb7c84f086652b507538d74a2.zip pfsense-31241000c625268eb7c84f086652b507538d74a2.tar.gz |
Add each member to the bridge individually rather than in one single command.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 5445717..8cb4a87 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -133,18 +133,6 @@ function interface_bridge_configure(&$bridge) $checklist = get_configured_interface_list(); - $cmd = ""; - foreach ($members as $member) { - if (!array_key_exists($member, $checklist)) - continue; - $realif = get_real_interface($member); - $realif = escapeshellarg($realif); - /* make sure the parent interface is up */ - mwexec("/sbin/ifconfig {$realif} up"); - $cmd .= " addm {$realif}"; - } - - if ($g['booting'] || $bridge['bridgeif'] <> "") { mwexec("/sbin/ifconfig {$bridge['bridgeif']} destroy"); mwexec("/sbin/ifconfig {$bridge['bridgeif']} create"); @@ -153,8 +141,16 @@ function interface_bridge_configure(&$bridge) $bridgeif = exec("/sbin/ifconfig bridge create"); /* Add interfaces to bridge */ - mwexec("/sbin/ifconfig {$bridgeif} {$cmd}"); - + foreach ($members as $member) { + if (!array_key_exists($member, $checklist)) + continue; + $realif = get_real_interface($member); + $realif = escapeshellarg($realif); + /* make sure the parent interface is up */ + mwexec("/sbin/ifconfig {$realif} up"); + mwexec("/sbin/ifconfig {$bridgeif} addm {$realif}"); + } + if (isset($bridge['enablestp'])) { /* Choose spanning tree proto */ mwexec("/sbin/ifconfig {$bridgeif} proto {$bridge['proto']}"); |