Networkd: Start DHCP server when link is up.
authorSusant Sahani <susant@redhat.com>
Mon, 9 Jul 2018 05:40:54 +0000 (11:10 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 23 Aug 2018 08:03:30 +0000 (10:03 +0200)
Closes #9479

src/network/networkd-link.c

index 619a314..96e1119 100644 (file)
@@ -1096,7 +1096,7 @@ static int link_enter_set_addresses(Link *link) {
 
         /* now that we can figure out a default address for the dhcp server,
            start it */
-        if (link_dhcp4_server_enabled(link)) {
+        if (link_dhcp4_server_enabled(link) && (link->flags & IFF_UP)) {
                 Address *address;
                 Link *uplink = NULL;
                 bool acquired_uplink = false;