diff options
author | Thomas Haller <thaller@redhat.com> | 2016-05-20 09:41:40 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-06-30 08:29:55 +0200 |
commit | fa5230e25537481854e023062fbc7869c855c746 (patch) | |
tree | dcd850bcae9009c2c3b1c6cd41473cf24d078fe3 /src/devices/nm-device-macvlan.c | |
parent | 224937f5dddb1c3a2e6af195f2c58ef05a81d5c9 (diff) | |
download | NetworkManager-fa5230e25537481854e023062fbc7869c855c746.tar.gz |
device: refactor setting HW address via nm_device_set_hw_addr()
This brings no real change in behavior, except getting rid of the
logging domain argument.
Diffstat (limited to 'src/devices/nm-device-macvlan.c')
-rw-r--r-- | src/devices/nm-device-macvlan.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c index d2ebc38c34..f829f99c31 100644 --- a/src/devices/nm-device-macvlan.c +++ b/src/devices/nm-device-macvlan.c @@ -516,7 +516,7 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) s_wired = (NMSettingWired *) nm_device_get_applied_setting (dev, NM_TYPE_SETTING_WIRED); if (s_wired) cloned_mac = nm_setting_wired_get_cloned_mac_address (s_wired); - nm_device_set_hw_addr (dev, cloned_mac, "set", LOGD_HW); + nm_device_hw_addr_set (dev, cloned_mac); return TRUE; } @@ -550,11 +550,7 @@ realize_start_notify (NMDevice *device, const NMPlatformLink *plink) static void deactivate (NMDevice *device) { - /* Reset MAC address back to initial address */ - if (nm_device_get_initial_hw_address (device)) { - nm_device_set_hw_addr (device, nm_device_get_initial_hw_address (device), - "reset", LOGD_DEVICE); - } + nm_device_hw_addr_reset (device); } /******************************************************************/ |