diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2015-04-30 22:01:27 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2015-04-30 22:01:27 +0200 |
commit | cb8ba18b660f7479c464ff6fc2d37082080abd4e (patch) | |
tree | b2102b62014aa18a636778a699fba1e867579421 | |
parent | a30ba73411672e476b9bdf71bb7d5c3f66d0f9cc (diff) | |
download | NetworkManager-cb8ba18b660f7479c464ff6fc2d37082080abd4e.tar.gz |
fixup! ipv4ll: use internal implementationbg/ipv4ll-bgo747463
-rw-r--r-- | src/devices/nm-device.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 6b751a9960..f9827dddad 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2793,10 +2793,9 @@ static NMActStageReturn ipv4ll_start (NMDevice *self, NMDeviceStateReason *reason) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); - struct ether_addr addr; + const struct ether_addr *addr; int ifindex, r; - const char *mac; - size_t mac_len; + size_t addr_len; ipv4ll_cleanup (self); @@ -2813,14 +2812,13 @@ ipv4ll_start (NMDevice *self, NMDeviceStateReason *reason) } ifindex = nm_device_get_ip_ifindex (self); - mac = nm_platform_link_get_address (NM_PLATFORM_GET, ifindex, &mac_len); - if (!mac || mac_len != ETH_ALEN) { + addr = nm_platform_link_get_address (NM_PLATFORM_GET, ifindex, &addr_len); + if (!addr || addr_len != ETH_ALEN) { _LOGE (LOGD_AUTOIP4, "IPv4LL: can't retrieve hardware address"); goto fail; } - memcpy (&addr, mac, ETH_ALEN); - r = sd_ipv4ll_set_mac (priv->ipv4ll, &addr); + r = sd_ipv4ll_set_mac (priv->ipv4ll, addr); if (r < 0) { _LOGE (LOGD_AUTOIP4, "IPv4LL: set_mac() failed with error %d", r); goto fail; |