Files
systemd/src/network/networkd-dhcp-server.h
T
Yu Watanabe 7a89aeb138 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.
2024-03-18 22:33:14 +09:00

24 lines
848 B
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#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);
void manager_toggle_dhcp4_server_state(Manager *manager, bool start);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_server_relay_agent_suboption);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_server_emit);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_server_address);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_server_ipv6_only_preferred);