summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp-server.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-03-12 10:21:38 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-03-18 14:33:14 +0100
commit7a89aeb1385bcae2b8d78c23558993351b08a6ce (patch)
tree65adc26844e0e56a0f72091eba707d2492afe5ff /src/network/networkd-dhcp-server.h
parentdnssd: support service subtypes (diff)
downloadsystemd-7a89aeb1385bcae2b8d78c23558993351b08a6ce.tar.xz
systemd-7a89aeb1385bcae2b8d78c23558993351b08a6ce.zip
network/address: acquire address from DHCP server lease file
If the DHCP server on an interface is configured with its server address is null, then let's reuse the previous server address if possible. Otherwise, if networkd is restarted or the host is rebooted, then possibly new subnet is picked, and clients that already have addresses in the previous subnet cannot access the server. Prompted by https://github.com/systemd/systemd/pull/30021#discussion_r1518478633.
Diffstat (limited to '')
-rw-r--r--src/network/networkd-dhcp-server.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/networkd-dhcp-server.h b/src/network/networkd-dhcp-server.h
index dbc7d95cad..e839fac00b 100644
--- a/src/network/networkd-dhcp-server.h
+++ b/src/network/networkd-dhcp-server.h
@@ -2,14 +2,16 @@
#pragma once
#include "conf-parser.h"
+#include "in-addr-util.h"
#include "set.h"
+typedef struct Address Address;
typedef struct Link Link;
typedef struct Manager Manager;
typedef struct Network Network;
int network_adjust_dhcp_server(Network *network, Set **addresses);
-
+int address_acquire_from_dhcp_server_leases_file(Link *link, const Address *address, union in_addr_union *ret);
int link_request_dhcp_server(Link *link);
int link_start_dhcp4_server(Link *link);