summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-05-01 18:21:40 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-05-01 18:21:40 +0000
commit38226b19a0e55af205e5920675673679e45a8653 (patch)
tree9339adabd31379934ec1b4d5d528b698f58beb4a /etc
parentff3a5e379d4c8253ef7f46f02c1bc39ca93ed39d (diff)
downloadpfsense-38226b19a0e55af205e5920675673679e45a8653.zip
pfsense-38226b19a0e55af205e5920675673679e45a8653.tar.gz
Configure bridges using Open/Net style code.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc25
1 files changed, 14 insertions, 11 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index ef385e5..9159505 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -165,13 +165,13 @@ function interfaces_optional_configure() {
if ($bridgeconfig) {
/* Set the system bridge configuration and enable bridging. */
- mwexec("/sbin/sysctl net.link.ether.bridge_cfg=" . $bridgeconfig);
- mwexec("/sbin/sysctl net.link.ether.bridge.enable=1");
- if (isset($config['bridge']['filteringbridge']))
- mwexec("/sbin/sysctl net.link.ether.bridge.pf=1");
+ //mwexec("/sbin/sysctl net.link.ether.bridge_cfg=" . $bridgeconfig);
+ //mwexec("/sbin/sysctl net.link.ether.bridge.enable=1");
+ //if (isset($config['bridge']['filteringbridge']))
+ // mwexec("/sbin/sysctl net.link.ether.bridge.pf=1");
} else {
- mwexec("/sbin/sysctl net.link.ether.bridge.pf=0");
- mwexec("/sbin/sysctl net.link.ether.bridge.enable=0");
+ //mwexec("/sbin/sysctl net.link.ether.bridge.pf=0");
+ //mwexec("/sbin/sysctl net.link.ether.bridge.enable=0");
}
if (!$g['booting']) {
@@ -238,12 +238,15 @@ function interfaces_optional_configure_if($opti) {
mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) .
" delete up");
- if ($bridgeconfig != "")
- $bridgeconfig .= ",";
+ //if ($bridgeconfig != "")
+ // $bridgeconfig .= ",";
- $bridgeconfig .= $optcfg['if'] . ":" . $opti . "," .
- $config['interfaces'][$optcfg['bridge']]['if'] .
- ":" . $opti;
+ //$bridgeconfig .= $optcfg['if'] . ":" . $opti . "," .
+ // $config['interfaces'][$optcfg['bridge']]['if'] .
+ // ":" . $opti;
+
+ /* use open/netBSD style bridge */
+ mwexec("/sbin/brconfig bridge0 add {$optcfg['if']} add {$config['interfaces'][$optcfg['bridge']]['if']} up ");
} else {
mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) . " " .
escapeshellarg($optcfg['ipaddr'] . "/" . $optcfg['subnet']));
OpenPOWER on IntegriCloud