1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

Merge pull request #21632 from yuwata/network-dhcp6pd-fix-typo-and-split

network: dhcp6pd: fix typo and split file
This commit is contained in:
Yu Watanabe 2021-12-06 21:24:47 +09:00 committed by GitHub
commit 86a4b84aa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 1075 additions and 1048 deletions

View File

@ -73,6 +73,8 @@ sources = files('''
networkd-conf.h
networkd-dhcp-common.c
networkd-dhcp-common.h
networkd-dhcp-prefix-delegation.c
networkd-dhcp-prefix-delegation.h
networkd-dhcp-server-bus.c
networkd-dhcp-server-bus.h
networkd-dhcp-server-static-lease.c

View File

@ -1299,7 +1299,7 @@ int config_parse_uplink(
name = &network->router_uplink_name;
} else if (streq(section, "DHCPv6PrefixDelegation")) {
index = &network->dhcp6_pd_uplink_index;
name = &network->dhcp_server_uplink_name;
name = &network->dhcp6_pd_uplink_name;
accept_none = false;
} else
assert_not_reached();

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,19 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdbool.h>
#include "conf-parser.h"
typedef struct Link Link;
bool link_dhcp6_pd_is_enabled(Link *link);
bool dhcp6_pd_is_uplink(Link *link, Link *target, bool accept_auto);
int dhcp6_pd_find_uplink(Link *link, Link **ret);
bool dhcp6_lease_has_pd_prefix(sd_dhcp6_lease *lease);
int dhcp6_pd_remove(Link *link, bool only_marked);
int dhcp6_request_prefix_delegation(Link *link);
int dhcp6_pd_prefix_acquired(Link *dhcp6_link);
void dhcp6_pd_prefix_lost(Link *dhcp6_link);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_pd_subnet_id);

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,6 @@
#pragma once
#include "conf-parser.h"
#include "in-addr-util.h"
#include "macro.h"
typedef enum DHCP6ClientStartMode {
@ -17,13 +16,10 @@ typedef struct Link Link;
typedef struct Request Request;
bool link_dhcp6_with_address_enabled(Link *link);
bool link_dhcp6_pd_is_enabled(Link *link);
int dhcp6_pd_find_uplink(Link *link, Link **ret);
int dhcp6_pd_remove(Link *link, bool only_marked);
int dhcp6_check_ready(Link *link);
int dhcp6_update_mac(Link *link);
int dhcp6_start(Link *link);
int dhcp6_start_on_ra(Link *link, bool information_request);
int dhcp6_request_prefix_delegation(Link *link);
int request_process_dhcp6_client(Request *req);
int link_request_dhcp6_client(Link *link);
@ -33,7 +29,6 @@ int link_serialize_dhcp6_client(Link *link, FILE *f);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_pd_prefix_hint);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_mud_url);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_client_start_mode);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp6_pd_subnet_id);
const char* dhcp6_client_start_mode_to_string(DHCP6ClientStartMode i) _const_;
DHCP6ClientStartMode dhcp6_client_start_mode_from_string(const char *s) _pure_;

View File

@ -35,6 +35,7 @@
#include "networkd-bridge-fdb.h"
#include "networkd-bridge-mdb.h"
#include "networkd-can.h"
#include "networkd-dhcp-prefix-delegation.h"
#include "networkd-dhcp-server.h"
#include "networkd-dhcp4.h"
#include "networkd-dhcp6.h"

View File

@ -15,6 +15,7 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
#include "networkd-bridge-mdb.h"
#include "networkd-can.h"
#include "networkd-dhcp-common.h"
#include "networkd-dhcp-prefix-delegation.h"
#include "networkd-dhcp-server-static-lease.h"
#include "networkd-dhcp-server.h"
#include "networkd-dhcp4.h"

View File

@ -756,6 +756,7 @@ static Network *network_free(Network *network) {
free(network->dhcp_server_timezone);
free(network->dhcp_server_uplink_name);
free(network->router_uplink_name);
free(network->dhcp6_pd_uplink_name);
for (sd_dhcp_lease_server_type_t t = 0; t < _SD_DHCP_LEASE_SERVER_TYPE_MAX; t++)
free(network->dhcp_server_emit[t].addresses);

View File

@ -9,7 +9,7 @@
#include "dns-domain.h"
#include "networkd-address-generation.h"
#include "networkd-address.h"
#include "networkd-dhcp6.h"
#include "networkd-dhcp-prefix-delegation.h"
#include "networkd-link.h"
#include "networkd-manager.h"
#include "networkd-network.h"