Project

General

Profile

Bug #2010 » globals.patch

Andre Keller, 11/16/2011 01:57 PM

View differences:

/etc/inc/globals.inc 2011-11-16 18:59:50.000000000 +0000
*/
function remove_numbers($string) {
$nums = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", " ");
$string = str_replace($nums, '', $string);
return $string;
function remove_ifindex($string) {
return preg_replace("/[0-9 ]+$/", "", $string);
}
function get_nics_with_capabilities($CAPABILITIES) {
......
$iface = trim($iface);
$capable = pfSense_get_interface_addresses($iface);
if(isset($capable['caps'][$CAPABILITIES])) {
$interfacenonum = remove_numbers($iface);
$interfacenonum = remove_ifindex($iface);
if(!in_array($interfacenonum, $vlan_native_supp))
$vlan_native_supp[] = $interfacenonum;
}
(2-2/3)