diff options
author | Thomas Haller <thaller@redhat.com> | 2019-08-22 09:40:45 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-08-28 16:27:00 +0200 |
commit | de439148dd5ee890d1879f48875c4624b1ec87d0 (patch) | |
tree | 4146c32e4576bfad332506355e449af41101005c /src/devices/nm-device-macvlan.c | |
parent | dc275121847fcfd02aeeb6360309e54300ebf3d4 (diff) | |
download | NetworkManager-de439148dd5ee890d1879f48875c4624b1ec87d0.tar.gz |
device: move redundant act_stage1_prepare() implementations to set hwaddr to NMDevice
This is so common, that NMDevice can handle it for us.
Diffstat (limited to 'src/devices/nm-device-macvlan.c')
-rw-r--r-- | src/devices/nm-device-macvlan.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c index 0a4635a852..d20d647d67 100644 --- a/src/devices/nm-device-macvlan.c +++ b/src/devices/nm-device-macvlan.c @@ -415,15 +415,6 @@ update_connection (NMDevice *device, NMConnection *connection) NULL); } -static NMActStageReturn -act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason) -{ - if (!nm_device_hw_addr_set_cloned (device, nm_device_get_applied_connection (device), FALSE)) - return NM_ACT_STAGE_RETURN_FAILURE; - - return NM_ACT_STAGE_RETURN_SUCCESS; -} - /*****************************************************************************/ static void @@ -502,7 +493,7 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass) device_class->connection_type_check_compatible = NM_SETTING_MACVLAN_SETTING_NAME; device_class->link_types = NM_DEVICE_DEFINE_LINK_TYPES (NM_LINK_TYPE_MACVLAN, NM_LINK_TYPE_MACVTAP); - device_class->act_stage1_prepare = act_stage1_prepare; + device_class->act_stage1_prepare_set_hwaddr_ethernet = TRUE; device_class->check_connection_compatible = check_connection_compatible; device_class->complete_connection = complete_connection; device_class->create_and_realize = create_and_realize; |