summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEspen Johansen <lsf@pfsense.org>2005-09-18 23:22:39 +0000
committerEspen Johansen <lsf@pfsense.org>2005-09-18 23:22:39 +0000
commita2c165121e8a412809c3a427afed194dcc91d6eb (patch)
tree520de127d9324379dea28cf59ac775ae7d79a201
parent8da3de3403b82da1550c64d0d1e933879005a5c6 (diff)
downloadpfsense-a2c165121e8a412809c3a427afed194dcc91d6eb.zip
pfsense-a2c165121e8a412809c3a427afed194dcc91d6eb.tar.gz
Adding (EXPERIMENTAL) WPA Support.
Still celaning ifconfig bugs. Settings are not done correctly
-rw-r--r--etc/inc/interfaces.inc30
1 files changed, 27 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index e9e43a9..a9b3696 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -397,7 +397,7 @@ function interfaces_wireless_configure($if, $wlcfg) {
$channel = " ";
/* wireless configuration */
- $ifcargs = escapeshellarg($if) . " ssid " . escapeshellarg($wlcfg['ssid']) . " channel {$channel} ";
+ $ifcargs = escapeshellarg($if) . " ssid " . escapeshellarg($wlcfg['ssid']) . " Channel {$channel} ";
if ($wlcfg['stationname'])
$ifcargs .= "stationname " . escapeshellarg($wlcfg['stationname']) . " ";
@@ -450,7 +450,7 @@ EOD;
$ifcargs .= "wepmode off ";
}
- if(isset($wlcfg['pureg'])) {
+ if(isset($wlcfg['pureg']['enable'])) {
$ifcargs .= "mode 11g ";
} else {
if (preg_match($g['wireless_regex'], $if)) {
@@ -576,7 +576,6 @@ EOD;
}
-
function find_dhclient_process($interface) {
if(filter_translate_type_to_real_interface($interface) <> "")
$realinterface = filter_translate_type_to_real_interface($interface);
@@ -1196,6 +1195,31 @@ function get_current_wan_address() {
}
}
+/****f* interfaces/is_jumbo_capable
+ * NAME
+ * is_jumbo_capable - Test if interface is jumbo frame capable. Useful for determining VLAN capability.
+ * INPUTS
+ * $int - string containing interface name
+ * RESULT
+ * boolean - true or false
+ ******/
+
+function is_jumbo_capable($int) {
+ /* Per:
+ * http://www.freebsd.org/cgi/man.cgi?query=vlan&manpath=FreeBSD+6.0-current&format=html
+ * Only the following drivers support large frames
+ */
+ $capable = array("bfe", "dc", "de", "fxp", "hme", "rl", "sis", "ste",
+ "tl", "tx", "xl", "em");
+
+ $int_family = preg_split("/[0-9]+/", $int);
+
+ if (in_array($int_family[0], $capable))
+ return true;
+ else
+ return false;
+}
+
/****f* interfaces/is_altq_capable
* NAME
* is_altq_capable - Test if interface is capable of using ALTQ
OpenPOWER on IntegriCloud