mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 14:30:18 +01:00
device: let NMDevice set hardware address instead of act_stage1_prepare()
This commit is contained in:
parent
de439148dd
commit
2d40b7ba61
2 changed files with 2 additions and 8 deletions
|
|
@ -507,11 +507,6 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
|||
s_bridge = (NMSetting *) nm_connection_get_setting_bridge (connection);
|
||||
g_return_val_if_fail (s_bridge, NM_ACT_STAGE_RETURN_FAILURE);
|
||||
|
||||
if (!nm_device_hw_addr_set_cloned (device, connection, FALSE)) {
|
||||
NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_CONFIG_FAILED);
|
||||
return NM_ACT_STAGE_RETURN_FAILURE;
|
||||
}
|
||||
|
||||
for (option = master_options; option->name; option++)
|
||||
commit_option (device, s_bridge, option, FALSE);
|
||||
|
||||
|
|
@ -758,6 +753,7 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass)
|
|||
device_class->master_update_slave_connection = master_update_slave_connection;
|
||||
|
||||
device_class->create_and_realize = create_and_realize;
|
||||
device_class->act_stage1_prepare_set_hwaddr_ethernet = TRUE;
|
||||
device_class->act_stage1_prepare = act_stage1_prepare;
|
||||
device_class->act_stage2_config = act_stage2_config;
|
||||
device_class->deactivate = deactivate;
|
||||
|
|
|
|||
|
|
@ -478,9 +478,6 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
|||
NMDevice *parent_device;
|
||||
NMSettingVlan *s_vlan;
|
||||
|
||||
if (!nm_device_hw_addr_set_cloned (device, nm_device_get_applied_connection (device), FALSE))
|
||||
return NM_ACT_STAGE_RETURN_FAILURE;
|
||||
|
||||
/* Change MAC address to parent's one if needed */
|
||||
parent_device = nm_device_parent_get_device (device);
|
||||
if (parent_device) {
|
||||
|
|
@ -599,6 +596,7 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass)
|
|||
device_class->link_changed = link_changed;
|
||||
device_class->unrealize_notify = unrealize_notify;
|
||||
device_class->get_generic_capabilities = get_generic_capabilities;
|
||||
device_class->act_stage1_prepare_set_hwaddr_ethernet = TRUE;
|
||||
device_class->act_stage1_prepare = act_stage1_prepare;
|
||||
device_class->get_configured_mtu = get_configured_mtu;
|
||||
device_class->is_available = is_available;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue