summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2015-05-01 16:05:37 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2015-05-12 10:06:07 +0200
commit3cf2edb10f5e8ac60db7ca2e71d1e754a177d08c (patch)
tree30f26a3f31fa92ae944a42d9a7c40019254925be
parent71260fa70ed256fcbef169ad86e0939aadabaf70 (diff)
systemd: fix DHCP on link state change
When the link goes down, the DHCP service has been disabled, while there is no corresponding functionality which enables the service when the link goes up again. This fix is taken from systemd 217.
-rw-r--r--recipes-core/systemd/systemd/networkd_dont_stop_the_dhcp_server.patch29
-rw-r--r--recipes-core/systemd/systemd_%.bbappend7
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes-core/systemd/systemd/networkd_dont_stop_the_dhcp_server.patch b/recipes-core/systemd/systemd/networkd_dont_stop_the_dhcp_server.patch
new file mode 100644
index 0000000..71e7920
--- /dev/null
+++ b/recipes-core/systemd/systemd/networkd_dont_stop_the_dhcp_server.patch
@@ -0,0 +1,29 @@
+From dbafa734d8d6ba4cb5efcbb2260105babcdcde1e Mon Sep 17 00:00:00 2001
+From: Tom Gundersen <teg@jklm.no>
+Date: Sun, 26 Oct 2014 14:01:27 +0100
+Subject: [PATCH] networkd: don't stop the dhcp server when link goes down
+
+---
+ src/network/networkd-link.c | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index c6e173f..26ef0fe 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -344,15 +344,6 @@ static int link_stop_clients(Link *link) {
+ }
+ }
+
+- if (link->dhcp_server) {
+- k = sd_dhcp_server_stop(link->dhcp_server);
+- if (k < 0) {
+- log_warning_link(link, "Could not stop DHCPv4 server: %s",
+- strerror(-r));
+- r = k;
+- }
+- }
+-
+ if(link->icmp6_router_discovery) {
+
+ if (link->dhcp6_client) {
diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
new file mode 100644
index 0000000..b24e14c
--- /dev/null
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/systemd:"
+
+SRC_URI += " \
+ file://networkd_dont_stop_the_dhcp_server.patch \
+"
+
+PACKAGECONFIG_append = " networkd"