summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-12-28 08:38:06 +0000
committerErmal <eri@pfsense.org>2011-12-28 08:38:06 +0000
commit121dc11eac00c2244547bf942f3e4416c8b6cf3b (patch)
tree558d16fcccbac75f91fdc9c7036422cfd31629c7 /etc/inc/interfaces.inc
parent13113484a3f304455b5187a98a098c21ea0d74da (diff)
downloadpfsense-121dc11eac00c2244547bf942f3e4416c8b6cf3b.zip
pfsense-121dc11eac00c2244547bf942f3e4416c8b6cf3b.tar.gz
Implement is_jumbo_capable in a more performant way. This should help with large number of interfaces
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc13
1 files changed, 6 insertions, 7 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 3f67e5d..1740954 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -3729,15 +3729,14 @@ function generate_random_mac_address() {
* RESULT
* boolean - true or false
******/
-function is_jumbo_capable($int) {
- global $g;
+function is_jumbo_capable($iface) {
- $int_family = preg_split("/[0-9]+/", $int);
-
- if (in_array($int_family[0], $g['vlan_long_frame']))
+ $iface = trim($iface);
+ $capable = pfSense_get_interface_addresses($iface);
+ if (isset($capable['caps'][$CAPABILITIES]))
return true;
- else
- return false;
+
+ return false;
}
function setup_pppoe_reset_file($pppif, $iface="") {
OpenPOWER on IntegriCloud