mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
interfaces: configure all hardware devices on bootup; closes #5985
This commit is contained in:
parent
029f0c217e
commit
840c465d2b
@ -727,6 +727,24 @@ function _interfaces_gif_configure($gif)
|
||||
}
|
||||
}
|
||||
|
||||
function interfaces_hardware($verbose = false)
|
||||
{
|
||||
if ($verbose) {
|
||||
echo 'Configuring hardware interfaces...';
|
||||
flush();
|
||||
}
|
||||
|
||||
$intf_details = legacy_interfaces_details();
|
||||
|
||||
foreach (array_keys(get_interface_list()) as $device) {
|
||||
configure_interface_hardware($device, $intf_details);
|
||||
}
|
||||
|
||||
if ($verbose) {
|
||||
echo "done.\n";
|
||||
}
|
||||
}
|
||||
|
||||
function interfaces_configure($verbose = false)
|
||||
{
|
||||
$interfaces = [];
|
||||
|
||||
@ -448,7 +448,12 @@ function configure_interface_hardware($ifs, $intf_details = null)
|
||||
|
||||
$hwsettings = $config['system'];
|
||||
|
||||
if (strstr($ifs, 'vlan') || strstr($ifs, 'qinq') || strpos($ifs, '/') === 0) {
|
||||
/* XXX this needs fixing, lots of devices are not capable */
|
||||
if (
|
||||
strstr($ifs, 'vlan') || strpos($ifs, 'qinq') === 0 ||
|
||||
strpos($ifs, 'lo') === 0 || strpos($ifs, 'vxlan') === 0 ||
|
||||
strpos($ifs, 'ipsec') === 0 || strpos($ifs, '/') === 0
|
||||
) {
|
||||
/* skip checksumming */
|
||||
return;
|
||||
}
|
||||
|
||||
@ -87,6 +87,7 @@ system_hosts_generate(true);
|
||||
system_syslog_start(true);
|
||||
|
||||
filter_configure_sync(true, false); /* apply default policy before interface setup */
|
||||
interfaces_hardware(true);
|
||||
interfaces_configure(true);
|
||||
system_resolvconf_generate(true);
|
||||
filter_configure_sync(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user