mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
interfaces: configure_interface_hardware() can take previous details
This commit is contained in:
parent
6b29cc356b
commit
351295ecba
@ -2439,9 +2439,9 @@ function interface_configure($verbose = false, $interface = 'wan', $reload = fal
|
||||
}
|
||||
|
||||
/* apply interface hardware settings (tso, lro, ..) */
|
||||
/* XXX pass down $ifconfig_details */
|
||||
/* XXX maybe spoofmac, media and promisc can live here too? */
|
||||
configure_interface_hardware($realhwif);
|
||||
/* XXX a lagg or vlan or bridge could be resolved inside this function */
|
||||
configure_interface_hardware($realhwif, $ifconfig_details);
|
||||
|
||||
switch ($wancfg['ipaddr']) {
|
||||
case 'dhcp':
|
||||
|
||||
@ -414,7 +414,7 @@ function legacy_interface_details($intf)
|
||||
* configure interface hardware settings
|
||||
* @param string $ifs interface name
|
||||
*/
|
||||
function configure_interface_hardware($ifs)
|
||||
function configure_interface_hardware($ifs, $intf_details = null)
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -425,9 +425,13 @@ function configure_interface_hardware($ifs)
|
||||
return;
|
||||
}
|
||||
|
||||
$intf_details = legacy_interface_details($ifs);
|
||||
if ($intf_details !== null) {
|
||||
$intf_details = $intf_details[$ifs];
|
||||
} else {
|
||||
$intf_details = legacy_interface_details($ifs);
|
||||
}
|
||||
|
||||
// interface overwrites
|
||||
/* interface overwrites */
|
||||
foreach ($config['interfaces'] as $iface => $ifconf) {
|
||||
if (!empty($ifconf['if']) && $ifconf['if'] == $ifs) {
|
||||
if (!empty($ifconf['hw_settings_overwrite'])) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user