summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorpelaufer <paul@laufernet.com>2023-09-02 22:52:35 +0200
committerpelaufer <paul@laufernet.com>2023-09-02 22:52:35 +0200
commitf8da534e25dbdde2ec4d4390303cdf6a431643d9 (patch)
tree172e14b0fcd1cbe3a5070c3b4084ed4fd5eeb066 /src/network/networkd-dhcp4.c
parentAdding dhcp client and dhcp6 client state interface (diff)
downloadsystemd-f8da534e25dbdde2ec4d4390303cdf6a431643d9.tar.xz
systemd-f8da534e25dbdde2ec4d4390303cdf6a431643d9.zip
Adding dhcp client and dhcp6 client dbus status interface
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 9dcd37e11c..f952d6dfbc 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -13,6 +13,7 @@
#include "network-internal.h"
#include "networkd-address.h"
#include "networkd-dhcp-prefix-delegation.h"
+#include "networkd-dhcp4-bus.h"
#include "networkd-dhcp4.h"
#include "networkd-ipv4acd.h"
#include "networkd-link.h"
@@ -1482,6 +1483,10 @@ static int dhcp4_configure(Link *link) {
if (r < 0)
return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to set request flag for broadcast: %m");
+ r = dhcp_client_set_state_callback(link->dhcp_client, dhcp_client_callback_bus, link);
+ if (r < 0)
+ return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to set state change callback: %m");
+
if (link->mtu > 0) {
r = sd_dhcp_client_set_mtu(link->dhcp_client, link->mtu);
if (r < 0)