diff options
author | gnhb <gnoahb@gmail.com> | 2010-05-02 15:08:05 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-05-02 15:08:05 +0700 |
commit | 44d57a2bf2b2ad139a40b57a53962924eee73edb (patch) | |
tree | 6a92ccf1b52cb780771b81c03b655f49650f8432 /etc/inc/interfaces.inc | |
parent | c9797064082250643d7724171618fc7e693ac494 (diff) | |
parent | 0acae2a0f8cb8c48702c357ba3afaff673232a4d (diff) | |
download | pfsense-44d57a2bf2b2ad139a40b57a53962924eee73edb.zip pfsense-44d57a2bf2b2ad139a40b57a53962924eee73edb.tar.gz |
Merge branch 'master' of http://gitweb.pfsense.org/pfsense/mainline into mlppp
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 9044d48..94c5311 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2199,7 +2199,7 @@ EOD; } $mpdconf .= <<<EOD - set ipcp yes vjcomp + set ipcp no vjcomp set ipcp ranges 0.0.0.0/0 0.0.0.0/0 create link static {$interface}L1 pppoe set link disable incoming @@ -2801,16 +2801,11 @@ function link_interface_to_vlans($int, $action = "") { if (empty($int)) return; - $real_if = get_real_interface($int); if (is_array($config['vlans']['vlan'])) { foreach ($config['vlans']['vlan'] as $vlan) { - if ($real_if == $vlan['if']) { + if ($int == $vlan['if']) { if ($action == "update") { - foreach ($config['interfaces'] as $ifname => $ifcfg) { - if ($ifcfg['if'] == $vlan['vlanif']) - interface_vlan_configure($vlan); - interface_configure($ifname); - } + interfaces_bring_up($int); } else if ($action == "") return $vlan; } @@ -3045,7 +3040,6 @@ function get_wireless_modes($interface) { if(is_interface_wireless($wlif)) { $cloned_interface = get_real_interface($interface); - $wi = 1; $chan_list = "/sbin/ifconfig {$cloned_interface} list chan"; $stack_list = "/usr/bin/awk -F\"Channel \" '{ gsub(/\\*/, \" \"); print \$2 \"\\\n\" \$3 }'"; $format_list = "/usr/bin/awk '{print \$5 \" \" \$6 \",\" \$1}'"; @@ -3084,6 +3078,30 @@ function get_wireless_modes($interface) { return($wireless_modes); } +/* return channel numbers, frequency, max txpower, and max regulation txpower */ +function get_wireless_channel_info($interface) { + $wireless_channels = array(); + + $wlif = interface_translate_type_to_real($interface); + + if(is_interface_wireless($wlif)) { + $cloned_interface = get_real_interface($interface); + $chan_list = "/sbin/ifconfig {$cloned_interface} list txpower"; + $stack_list = "/usr/bin/awk -F\"Channel \" '{ gsub(/\\*/, \" \"); print \$2 \"\\\n\" \$3 }'"; + $format_list = "/usr/bin/awk '{print \$1 \",\" \$3 \" \" \$4 \",\" \$5 \",\" \$7}'"; + + $interface_channels = ""; + exec("$chan_list | $stack_list | sort -u | $format_list 2>&1", $interface_channels); + + foreach ($interface_channels as $channel_line) { + $channel_line = explode(",", $channel_line); + if(!isset($wireless_channels[$channel_line[0]])) + $wireless_channels[$channel_line[0]] = $channel_line; + } + } + return($wireless_channels); +} + /****f* interfaces/get_interface_mtu * NAME * get_interface_mtu - Return the mtu of an interface |