diff options
author | Tom Gundersen <teg@jklm.no> | 2014-04-13 22:10:34 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-04-14 17:53:01 +0200 |
commit | e9189a1f56e5dd418d13dfcf3a7f5a701884858e (patch) | |
tree | 9224d41cc1fd094fe0def5990330ead34d52c006 | |
parent | d060b62fcb4746d3758c567e9379c6728a035b66 (diff) |
networkd: link - ignore missing MAC address from NEWLINK message
The kernel may broadcast such messages, simply discard them.
-rw-r--r-- | src/network/networkd-link.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |