From e9189a1f56e5dd418d13dfcf3a7f5a701884858e Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sun, 13 Apr 2014 22:10:34 +0200 Subject: networkd: link - ignore missing MAC address from NEWLINK message The kernel may broadcast such messages, simply discard them. --- src/network/networkd-link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/network') diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 7f815382a4..927dbb1960 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1490,10 +1490,10 @@ int link_update(Link *link, sd_rtnl_message *m) { PRIu16, link->original_mtu); } + /* The kernel may broadcast NEWLINK messages without the MAC address + set, simply ignore them. */ r = sd_rtnl_message_read_ether_addr(m, IFLA_ADDRESS, &mac); - if (r < 0) - log_debug_link(link, "Could not get MAC address: %s", strerror(-r)); - else { + if (r >= 0) { if (memcmp(link->mac.ether_addr_octet, mac.ether_addr_octet, ETH_ALEN)) { memcpy(link->mac.ether_addr_octet, mac.ether_addr_octet, ETH_ALEN); -- cgit v1.2.3-54-g00ecf