fix(sys-apps/systemd): Fix matching by MAC address

This commit is contained in:
Michael Marineau 2014-06-12 13:51:42 -07:00
parent 65efddaa85
commit 37744a633e
4 changed files with 38 additions and 2 deletions

View File

@ -1,7 +1,7 @@
From 58a08cac31af656c25532a075a1182f6b45217a7 Mon Sep 17 00:00:00 2001 From 58a08cac31af656c25532a075a1182f6b45217a7 Mon Sep 17 00:00:00 2001
From: Michael Marineau <michael.marineau@coreos.com> From: Michael Marineau <michael.marineau@coreos.com>
Date: Thu, 29 May 2014 10:59:42 -0700 Date: Thu, 29 May 2014 10:59:42 -0700
Subject: [PATCH 1/2] shared: fix searching for configs in alternate roots Subject: [PATCH 1/3] shared: fix searching for configs in alternate roots
Commit 12ed81d9 changed path_strv_canonicalize_absolute's behavior to Commit 12ed81d9 changed path_strv_canonicalize_absolute's behavior to
return a directory list without the root prefix if one was given but did return a directory list without the root prefix if one was given but did

View File

@ -1,7 +1,7 @@
From fa51901447b24b4894da26a35a16596a90786429 Mon Sep 17 00:00:00 2001 From fa51901447b24b4894da26a35a16596a90786429 Mon Sep 17 00:00:00 2001
From: Camilo Aguilar <camilo.aguilar@gmail.com> From: Camilo Aguilar <camilo.aguilar@gmail.com>
Date: Tue, 27 May 2014 23:05:14 -0400 Date: Tue, 27 May 2014 23:05:14 -0400
Subject: [PATCH 2/2] sd-dhcp-client: Sets broadcast flag to 1 Subject: [PATCH 2/3] sd-dhcp-client: Sets broadcast flag to 1
In systems running on hypervisors this flag needs to be set ON, so offers can reach In systems running on hypervisors this flag needs to be set ON, so offers can reach
the virtual machines. the virtual machines.

View File

@ -0,0 +1,33 @@
From 6a3cbd39d60bdb84f82b0a9b5a77ecb6769ee2db Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Wed, 4 Jun 2014 21:29:08 +0200
Subject: [PATCH 3/3] 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)
--
1.8.5.5

View File

@ -117,6 +117,9 @@ fi
# fix DHCP for VMware bridged network interfaces # fix DHCP for VMware bridged network interfaces
epatch "${FILESDIR}"/213-0002-sd-dhcp-client-Sets-broadcast-flag-to-1.patch epatch "${FILESDIR}"/213-0002-sd-dhcp-client-Sets-broadcast-flag-to-1.patch
# fix matching interfaces by MAC address
epatch "${FILESDIR}"/213-0003-networkd-link-intialize-mac-address.patch
# Bug 463376 # Bug 463376
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die