[systemd-commits] src/network

Tom Gundersen tomegun at kemper.freedesktop.org
Wed Jun 4 12:32:48 PDT 2014


 src/network/networkd-link.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 512922f8b423eed093918f78461b7bf7c45592cb
Author: Tom Gundersen <teg at jklm.no>
Date:   Wed Jun 4 21:29:08 2014 +0200

    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 6e6fb83..3653426 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)



More information about the systemd-commits mailing list