PKGBUILDs/core/systemd/0001-networkd-link-intialize-mac-address.patch

34 lines
1 KiB
Diff
Raw Normal View History

2014-06-14 00:16:28 +00:00
From 2ae6cda520f5c925ba313b8e83ea8b58bc00112c Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Wed, 4 Jun 2014 21:29:08 +0200
Subject: [PATCH] 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.
Conflicts:
src/network/networkd-link.c
---
src/network/networkd-link.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 6677b94..9afb871 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/network/links/%"PRIu64,
link->ifindex);
if (r < 0)
--
2.0.0