mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
console: strangely enough the code doesn't work as intended
This commit is contained in:
parent
5a27e1988b
commit
a26b45977b
@ -133,10 +133,9 @@ EOD;
|
||||
|
||||
if (isset($config['laggs']['lagg'][0])) {
|
||||
foreach ($config['laggs']['lagg'] as $lagg) {
|
||||
$dmesg = "Link aggregation, member interfaces {$lagg['members']}";
|
||||
$iflist_lagg[$lagg['laggif']] = $iflist_all[$lagg['laggif']] = [
|
||||
'mac' => 'xx:xx:xx:xx:xx:xx',
|
||||
'dmesg' => $dmesg,
|
||||
'dmesg' => "Link aggregation, member interfaces {$lagg['members']}",
|
||||
'mac' => '00:00:00:00:00:00',
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -157,10 +156,9 @@ EOD;
|
||||
|
||||
if (isset($config['vlans']['vlan'][0])) {
|
||||
foreach ($config['vlans']['vlan'] as $vlan) {
|
||||
$dmesg = "VLAN tag {$vlan['tag']}, parent interface {$vlan['if']}";
|
||||
$iflist_all[$vlan['if'] . '_vlan' . $vlan['tag']] = [
|
||||
'mac' => $iflist_all[$vlan['if']]['mac'],
|
||||
'dmesg' => $dmesg,
|
||||
'dmesg' => "VLAN tag {$vlan['tag']}, parent interface {$vlan['if']}",
|
||||
'mac' => '00:00:00:00:00:00',
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -173,6 +171,10 @@ Valid interfaces are:
|
||||
|
||||
EOD;
|
||||
|
||||
/*
|
||||
* We are checking $iflist here for physical members only, but
|
||||
* iterate over $iflist_all when that sanity check succeeded.
|
||||
*/
|
||||
if (empty($iflist)) {
|
||||
echo "No interfaces found!\n";
|
||||
} else {
|
||||
|
||||
@ -846,6 +846,7 @@ function get_interface_list($only_active = false, $include_dmesg = false)
|
||||
|
||||
/* list of virtual interface types */
|
||||
$vfaces = array(
|
||||
'_vip'
|
||||
'_vlan',
|
||||
'_wlan',
|
||||
'bridge',
|
||||
@ -860,14 +861,14 @@ function get_interface_list($only_active = false, $include_dmesg = false)
|
||||
'lo',
|
||||
'ng',
|
||||
'pflog',
|
||||
'pfsync',
|
||||
'plip',
|
||||
'ppp',
|
||||
'pppoe',
|
||||
'pptp',
|
||||
'pfsync',
|
||||
'sl',
|
||||
'tap',
|
||||
'tun',
|
||||
'vip'
|
||||
);
|
||||
|
||||
$ifnames_up = legacy_interface_listget('up');
|
||||
@ -889,7 +890,7 @@ function get_interface_list($only_active = false, $include_dmesg = false)
|
||||
|
||||
foreach ($ifnames as $ifname) {
|
||||
$tmp_ifnames = preg_split('/\d+/', $ifname);
|
||||
if (in_array(array_shift($tmp_ifnames), $vfaces)) {
|
||||
if (count(array_intersect($tmp_ifnames, $vfaces)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user