summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-04-13 22:10:34 +0200
committerTom Gundersen <teg@jklm.no>2014-04-14 17:53:01 +0200
commite9189a1f56e5dd418d13dfcf3a7f5a701884858e (patch)
tree9224d41cc1fd094fe0def5990330ead34d52c006 /src
parentd060b62fcb4746d3758c567e9379c6728a035b66 (diff)
networkd: link - ignore missing MAC address from NEWLINK message
The kernel may broadcast such messages, simply discard them.
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-link.c6
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);