mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
33 lines
1 KiB
Diff
33 lines
1 KiB
Diff
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
|
|
|