chiark / gitweb /
journal-remote: rework fd and writer reference handling
[elogind.git] / src / network / networkd-link.c
index ccf818115b3192313628c204ceabfcbf7783fc08..0fb323b9a54b7299d48b7bf7e6225bdea8bfd0a6 100644 (file)
@@ -24,6 +24,7 @@
 #include <unistd.h>
 
 #include "networkd.h"
+#include "networkd-netdev.h"
 #include "libudev-private.h"
 #include "udev-util.h"
 #include "util.h"
@@ -1997,6 +1998,10 @@ static int link_configure(Link *link) {
                 if (r < 0)
                         return r;
 
+                r = sd_dhcp_client_set_request_broadcast(link->dhcp_client, link->network->dhcp_broadcast);
+                if (r < 0)
+                        return r;
+
                 if (link->network->dhcp_mtu) {
                         r = sd_dhcp_client_set_request_option(link->dhcp_client, 26);
                         if (r < 0)
@@ -2121,6 +2126,9 @@ int link_initialized(Link *link, struct udev_device *device) {
         if (link->state != LINK_STATE_INITIALIZING)
                 return 0;
 
+        if (link->udev_device)
+                return 0;
+
         log_debug_link(link, "udev initialized link");
 
         link->udev_device = udev_device_ref(device);