mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 18:14:42 +00:00
interfaces: update wireless prefixes, make it more maintainable
PR: https://forum.opnsense.org/index.php?topic=19247.0
This commit is contained in:
parent
c556975baa
commit
a4bcbd5a92
@ -93,8 +93,35 @@ function convert_128bit_to_ipv6($ip6bin)
|
||||
|
||||
function match_wireless_interface($int)
|
||||
{
|
||||
$wireless_regex = '/^(ndis|wi|ath|an|ral|ural|iwi|wlan|rum|run|bwn|zyd|mwl|bwi|ipw|iwn|malo|uath|upgt|urtw|wpi)/';
|
||||
return preg_match($wireless_regex, $int);
|
||||
$wireless_prefix = [
|
||||
'an',
|
||||
'ath',
|
||||
'bwi',
|
||||
'bwn',
|
||||
'ipw',
|
||||
'iwi',
|
||||
'iwm',
|
||||
'iwn',
|
||||
'malo',
|
||||
'mwl',
|
||||
'ndis',
|
||||
'otus',
|
||||
'ral',
|
||||
'rsu',
|
||||
'rtwn',
|
||||
'rum',
|
||||
'run',
|
||||
'uath',
|
||||
'upgt',
|
||||
'ural',
|
||||
'urtw',
|
||||
'wi',
|
||||
'wlan',
|
||||
'wpi',
|
||||
'zyd',
|
||||
];
|
||||
|
||||
return preg_match('/^(' . implode('|', $wireless_prefix) . ')/', $int);
|
||||
}
|
||||
|
||||
function interfaces_bring_up($interface)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user