From 3cf2edb10f5e8ac60db7ca2e71d1e754a177d08c Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 1 May 2015 16:05:37 +0200 Subject: 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. --- .../networkd_dont_stop_the_dhcp_server.patch | 29 ++++++++++++++++++++++ recipes-core/systemd/systemd_%.bbappend | 7 ++++++ 2 files changed, 36 insertions(+) create mode 100644 recipes-core/systemd/systemd/networkd_dont_stop_the_dhcp_server.patch create mode 100644 recipes-core/systemd/systemd_%.bbappend (limited to 'recipes-core') 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 +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" -- cgit v1.2.3