mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
interface: only parse actual options, not nd6 options #5985
This commit is contained in:
parent
a785c129a2
commit
dd4edff0fd
@ -269,7 +269,7 @@ function legacy_interfaces_details($intf = null)
|
||||
foreach (explode(',', $capabilities) as $capability) {
|
||||
$result[$current_interface]["capabilities"][] = strtolower(trim($capability));
|
||||
}
|
||||
} elseif (strpos(trim($line), 'options=') !== false) {
|
||||
} elseif (strpos(trim($line), 'options=') === 0) {
|
||||
// parse options
|
||||
$options = substr($line, strpos($line, '<') + 1, -1);
|
||||
foreach (explode(',', $options) as $option) {
|
||||
@ -506,13 +506,11 @@ function configure_interface_hardware($ifs, $intf_details = null)
|
||||
if (!isset($hwsettings['disablevlanhwfilter']) || $hwsettings['disablevlanhwfilter'] == 1) {
|
||||
// probe already selected options
|
||||
$selected_opts = [];
|
||||
if (!empty($intf_details['options'])) {
|
||||
foreach ($intf_details['options'] as $opt) {
|
||||
if ($opt == 'vlan_hwtagging') {
|
||||
$selected_opts[] = 'vlanhwtag';
|
||||
} else {
|
||||
$selected_opts[] = str_replace('_', '', $opt);
|
||||
}
|
||||
foreach ($intf_details['options'] as $opt) {
|
||||
if ($opt == 'vlan_hwtagging') {
|
||||
$selected_opts[] = 'vlanhwtag';
|
||||
} else {
|
||||
$selected_opts[] = str_replace('_', '', $opt);
|
||||
}
|
||||
}
|
||||
// set one tag at a time to avoid driver issues
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user