summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorStefan Christ <s.christ@phytec.de>2015-10-13 10:29:13 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-08 13:27:12 +0000
commitf251052c88f1f561cd12948de69d06de30a0823e (patch)
tree7bebd1d326e0e06d072bf828e3f3c3052137fd1e /meta
parent7d2e4518236726b5a43f48dc56324af53b6a1b06 (diff)
downloadpoky-f251052c88f1f561cd12948de69d06de30a0823e.tar.gz
systemd: fix networking setup when ipv6 modules are missing
If the ipv6 kernel modules are missing, e.g. /lib/modules/<version> doesn't match the runnig kernel, networkd doesn't bring up the interfaces correctly. Backport fix from systemd version v220. (From OE-Core rev: 3db960ef645606226784cbfd994d476892db07fe) Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/systemd/systemd/0016-networkd-fix-IFF_UP-when-ipv6-support-is-disabled.patch78
-rw-r--r--meta/recipes-core/systemd/systemd_219.bb1
2 files changed, 79 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0016-networkd-fix-IFF_UP-when-ipv6-support-is-disabled.patch b/meta/recipes-core/systemd/systemd/0016-networkd-fix-IFF_UP-when-ipv6-support-is-disabled.patch
new file mode 100644
index 0000000000..72f9a91c2c
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0016-networkd-fix-IFF_UP-when-ipv6-support-is-disabled.patch
@@ -0,0 +1,78 @@
1From b1362f4f60f192aa62effd9c19e0d98b68050f5a Mon Sep 17 00:00:00 2001
2From: Tom Gundersen <teg@jklm.no>
3Date: Tue, 8 Sep 2015 12:53:46 +0200
4Subject: [PATCH] networkd: fix IFF_UP when ipv6 support is disabled
5
6Passing ipv6 options (even when they should be noops) caused IFF_UP to
7fail when ipv6 was supported.
8
9Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90103
10
11(Backport from v220 to v219)
12Signed-off-by: Stefan Christ <s.christ@phytec.de>
13---
14 src/network/networkd-link.c | 43 +++++++++++++++++++++++--------------------
15 1 file changed, 23 insertions(+), 20 deletions(-)
16
17diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
18index f716e82..1aa1550 100644
19--- a/src/network/networkd-link.c
20+++ b/src/network/networkd-link.c
21@@ -1104,31 +1104,34 @@ static int link_up(Link *link) {
22 return r;
23 }
24
25- r = sd_rtnl_message_open_container(req, AF_INET6);
26- if (r < 0) {
27- log_link_error(link, "Could not open AF_INET6 container: %s", strerror(-r));
28- return r;
29- }
30-
31- ipv6ll_mode = link_ipv6ll_enabled(link) ? IN6_ADDR_GEN_MODE_EUI64 : IN6_ADDR_GEN_MODE_NONE;
32- r = sd_rtnl_message_append_u8(req, IFLA_INET6_ADDR_GEN_MODE, ipv6ll_mode);
33- if (r < 0) {
34- log_link_error(link, "Could not append IFLA_INET6_ADDR_GEN_MODE: %s", strerror(-r));
35- return r;
36- }
37+ if (socket_ipv6_is_supported()) {
38+ /* if the kernel lacks ipv6 support setting IFF_UP fails if any ipv6 options are passed */
39+ r = sd_rtnl_message_open_container(req, AF_INET6);
40+ if (r < 0) {
41+ log_link_error(link, "Could not open AF_INET6 container: %s", strerror(-r));
42+ return r;
43+ }
44
45- if (!in_addr_is_null(AF_INET6, &link->network->ipv6_token)) {
46- r = sd_rtnl_message_append_in6_addr(req, IFLA_INET6_TOKEN, &link->network->ipv6_token.in6);
47+ ipv6ll_mode = link_ipv6ll_enabled(link) ? IN6_ADDR_GEN_MODE_EUI64 : IN6_ADDR_GEN_MODE_NONE;
48+ r = sd_rtnl_message_append_u8(req, IFLA_INET6_ADDR_GEN_MODE, ipv6ll_mode);
49 if (r < 0) {
50- log_link_error(link, "Could not append IFLA_INET6_TOKEN: %s", strerror(-r));
51+ log_link_error(link, "Could not append IFLA_INET6_ADDR_GEN_MODE: %s", strerror(-r));
52 return r;
53 }
54- }
55
56- r = sd_rtnl_message_close_container(req);
57- if (r < 0) {
58- log_link_error(link, "Could not close AF_INET6 container: %s", strerror(-r));
59- return r;
60+ if (!in_addr_is_null(AF_INET6, &link->network->ipv6_token)) {
61+ r = sd_rtnl_message_append_in6_addr(req, IFLA_INET6_TOKEN, &link->network->ipv6_token.in6);
62+ if (r < 0) {
63+ log_link_error(link, "Could not append IFLA_INET6_TOKEN: %s", strerror(-r));
64+ return r;
65+ }
66+ }
67+
68+ r = sd_rtnl_message_close_container(req);
69+ if (r < 0) {
70+ log_link_error(link, "Could not close AF_INET6 container: %s", strerror(-r));
71+ return r;
72+ }
73 }
74
75 r = sd_rtnl_message_close_container(req);
76--
771.9.1
78
diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index a8b5ae1103..57cbe08346 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -43,6 +43,7 @@ SRC_URI = "git://github.com/systemd/systemd-stable;branch=v219-stable;protocol=g
43 file://0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch \ 43 file://0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch \
44 file://0014-Revert-rules-remove-firmware-loading-rules.patch \ 44 file://0014-Revert-rules-remove-firmware-loading-rules.patch \
45 file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \ 45 file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
46 file://0016-networkd-fix-IFF_UP-when-ipv6-support-is-disabled.patch \
46 file://tmpfiles-pam.patch \ 47 file://tmpfiles-pam.patch \
47 file://0001-Revert-core-mount-add-dependencies-to-dynamically-mo.patch \ 48 file://0001-Revert-core-mount-add-dependencies-to-dynamically-mo.patch \
48 file://touchscreen.rules \ 49 file://touchscreen.rules \