From: Tom Gundersen Date: Wed, 4 Jun 2014 19:29:08 +0000 (+0200) Subject: networkd: link - intialize mac address X-Git-Tag: v214~77 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=512922f8b423eed093918f78461b7bf7c45592cb;p=elogind.git networkd: link - intialize mac address Otherwise .netwrok matching on MAC address will not work. Based on patch by Dave Reisner, and bug originally reported by Max Pray. --- diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 6e6fb8393..365342689 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -75,6 +75,10 @@ static int link_new(Manager *manager, sd_rtnl_message *message, Link **ret) { if (!link->ifname) return -ENOMEM; + r = sd_rtnl_message_read_ether_addr(message, IFLA_ADDRESS, &link->mac); + if (r < 0) + return r; + r = asprintf(&link->state_file, "/run/systemd/netif/links/%"PRIu64, link->ifindex); if (r < 0)