summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-12-20 19:16:56 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-12-20 19:16:56 +0000
commitdf792110179eafa5dbdddb8db500c7b60a996b5c (patch)
treea35187aec134fc7018d0bc96457ad63c284aed40 /etc
parent6f6cc3c84d81f6f6dbbf57a4fe4b58de3daca6d5 (diff)
downloadpfsense-df792110179eafa5dbdddb8db500c7b60a996b5c.zip
pfsense-df792110179eafa5dbdddb8db500c7b60a996b5c.tar.gz
Do not enable STP on wireless interfaces
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc18
-rw-r--r--etc/inc/pfsense-utils.inc14
2 files changed, 29 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 72fc525..36e81ec 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -135,7 +135,11 @@ function interfaces_lan_configure() {
/* assign items to a bridge */
mwexec("/sbin/ifconfig bridge{$bridges_total} addm {$lancfg['if']} addm {$config['interfaces'][$lancfg['bridge']]['if']}");
- mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$lancfg['if']} stp {$config['interfaces'][$lancfg['bridge']]['if']}");
+
+ if(is_interface_wireless($lancfg['if']))
+ mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$lancfg['if']}");
+ if(is_interface_wireless($config['interfaces'][$lancfg['bridge']]['if']))
+ mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$config['interfaces'][$lancfg['bridge']]['if']}");
/* log commands run for debugging in /tmp/ */
$fd = fopen("{$g['tmp_path']}/bridge_config_{$lancfg['if']}", "w");
@@ -297,7 +301,11 @@ function interfaces_optional_configure_if($opti) {
/* assign items to a bridge */
mwexec("/sbin/ifconfig bridge{$bridges_total} addm {$optcfg['if']} addm {$config['interfaces'][$optcfg['bridge']]['if']}");
- mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$optcfg['if']} stp {$config['interfaces'][$optcfg['bridge']]['if']}");
+
+ if(is_interface_wireless($optcfg['if']))
+ mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$optcfg['if']}");
+ if(is_interface_wireless($config['interfaces'][$optcfg['bridge']]['if']))
+ mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$config['interfaces'][$optcfg['bridge']]['if']}");
/* log commands run for debugging in /tmp/ */
$fd = fopen("{$g['tmp_path']}/bridge_config_{$optcfg['if']}", "w");
@@ -819,7 +827,11 @@ function interfaces_wan_configure() {
/* assign items to a bridge */
mwexec("/sbin/ifconfig bridge{$bridges_total} addm {$wancfg['if']} addm {$config['interfaces'][$wancfg['bridge']]['if']}");
- mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$wancfg['if']} stp {$config['interfaces'][$wancfg['bridge']]['if']}");
+
+ if(is_interface_wireless($wancfg['if']))
+ mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$wancfg['if']}");
+ if(is_interface_wireless($config['interfaces'][$wancfg['bridge']]['if']))
+ mwexec("/sbin/ifconfig bridge{$bridges_total} stp {$config['interfaces'][$wancfg['bridge']]['if']}");
/* log commands run for debugging in /tmp/ */
$fd = fopen("{$g['tmp_path']}/bridge_config_{$wancfg['if']}", "w");
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index eece62e..019374e 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -338,6 +338,20 @@ function get_interface_mtu($interface) {
return $mtu;
}
+/****f* pfsense-utils/is_interface_wireless
+ * NAME
+ * is_interface_wireless - Returns if an interface is wireless
+ * RESULT
+ * $tmp - Returns if an interface is wireless
+ ******/
+function is_interface_wireless($interface) {
+ global $config, $g;
+ if(isset($config['interfaces'][$interface]['wireless']))
+ return true;
+ else
+ return false;
+}
+
/****f* pfsense-utils/find_number_of_created_carp_interfaces
* NAME
* find_number_of_created_carp_interfaces - Return the number of CARP interfaces.
OpenPOWER on IntegriCloud