From 512922f8b423eed093918f78461b7bf7c45592cb Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Wed, 4 Jun 2014 21:29:08 +0200 Subject: 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. --- src/network/networkd-link.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/network') diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 6e6fb8393e..3653426891 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) -- cgit v1.2.3-54-g00ecf