diff options
author | Tom Gundersen <teg@jklm.no> | 2014-06-04 21:29:08 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-06-04 21:29:25 +0200 |
commit | 512922f8b423eed093918f78461b7bf7c45592cb (patch) | |
tree | 8e4633bf62b6461f4f8c4e5149434094a0f6383d /src/network/networkd-link.c | |
parent | f598ac3e28b729dd0b1d0a881df3e16465687a2b (diff) |
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.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) |