|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
From 14d3f593b115fb46361e5dab4de0bead8451ca27 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
From: Susant Sahani <145210+ssahani@users.noreply.github.com>
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Date: Wed, 18 Oct 2017 16:08:56 +0530
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Subject: [PATCH] networkd: don't stop the dhcp server if it's not configured.
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
(#7083)
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
we call sd_dhcp_server_stop even if it's not configured when link is
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
down resulting unwanted logs.
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
```
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Oct 10 13:41:07 nena systemd-networkd[126]: eth0: Lost carrier
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Oct 10 13:41:07 nena systemd-networkd[126]: DHCP CLIENT (0x560f2dc5): STOPPED
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Oct 10 13:41:07 nena systemd-networkd[126]: eth0: DHCP lease lost
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Oct 10 13:41:07 nena systemd-networkd[126]: NDISC: Stopping IPv6 Router Solicitation client
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
Oct 10 13:41:07 nena systemd-networkd[126]: Assertion 'server' failed at ../src/libsystemd-network/sd-dhcp-server.c:256, function sd_dhcp_server_stop(). Ignoring.
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
```
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
fixes #7047
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
(cherry picked from commit 28464ae0e21e7b9dfea7b733f9470091b2480a9a)
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
src/network/networkd-link.c | 3 ++-
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
index c581a49b4e..70039940bc 100644
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
--- a/src/network/networkd-link.c
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
+++ b/src/network/networkd-link.c
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
@@ -3085,7 +3085,8 @@ static int link_carrier_lost(Link *link) {
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
return r;
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
- (void) sd_dhcp_server_stop(link->dhcp_server);
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
+ if (link_dhcp4_server_enabled(link))
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
+ (void) sd_dhcp_server_stop(link->dhcp_server);
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
r = link_drop_config(link);
|
|
Zbigniew Jędrzejewski-Szmek |
35bb94 |
if (r < 0)
|