summaryrefslogtreecommitdiff
path: root/core/systemd/0001-networkd-link-intialize-mac-address.patch
diff options
context:
space:
mode:
Diffstat (limited to 'core/systemd/0001-networkd-link-intialize-mac-address.patch')
-rw-r--r--core/systemd/0001-networkd-link-intialize-mac-address.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/core/systemd/0001-networkd-link-intialize-mac-address.patch b/core/systemd/0001-networkd-link-intialize-mac-address.patch
new file mode 100644
index 000000000..b0d8254e9
--- /dev/null
+++ b/core/systemd/0001-networkd-link-intialize-mac-address.patch
@@ -0,0 +1,33 @@
+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
+