summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-02-21 07:41:23 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-02-21 07:41:23 -0300
commit2ccac12588f59039c88d06126762f41be2f65ce2 (patch)
treeaa8d1842107f6c5a9b63b40283045dd859fdf129 /etc/inc
parenteed221974efafd2a926248ac1888314aaa453e43 (diff)
downloadpfsense-2ccac12588f59039c88d06126762f41be2f65ce2.zip
pfsense-2ccac12588f59039c88d06126762f41be2f65ce2.tar.gz
A nic family name can contain numbers on it, remove only the index in the end. Fixes #2010
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/interfaces.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 8d4faf7..3cd782d 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2887,7 +2887,7 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
if (!empty($wancfg['mtu'])) {
pfSense_interface_mtu($realif, $wancfg['mtu']);
} else {
- $mtu = get_interface_default_mtu(remove_numbers($realhwif));
+ $mtu = get_interface_default_mtu(remove_ifindex($realhwif));
if ($mtu != get_interface_mtu($realhwif))
pfSense_interface_mtu($realhwif, $mtu);
}
@@ -4521,7 +4521,7 @@ function is_altq_capable($int) {
"ndis", "tun", "ovpns", "ovpnc", "vlan", "pppoe", "pptp", "ng",
"l2tp", "ppp", "vtnet");
- $int_family = preg_split("/[0-9]+/", $int);
+ $int_family = remove_ifindex($int);
if (in_array($int_family[0], $capable))
return true;
@@ -4789,4 +4789,8 @@ function get_failover_interface($interface) {
return $wanif;
}
+function remove_ifindex($ifname) {
+ return preg_replace("/[0-9]+$/", "", $ifname);
+}
+
?>
OpenPOWER on IntegriCloud