send dhcpv6 release when stopping
This commit is contained in:
@@ -707,6 +707,12 @@ static int dhcp6_configure(Link *link) {
|
||||
"DHCPv6 CLIENT: Failed to %s rapid commit: %m",
|
||||
enable_disable(link->network->dhcp6_use_rapid_commit));
|
||||
|
||||
r = sd_dhcp6_client_set_send_release(client, link->network->dhcp6_send_release);
|
||||
if (r < 0)
|
||||
return log_link_debug_errno(link, r,
|
||||
"DHCPv6 CLIENT: Failed to %s sending release message on stop: %m",
|
||||
enable_disable(link->network->dhcp6_send_release));
|
||||
|
||||
link->dhcp6_client = TAKE_PTR(client);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -270,6 +270,7 @@ DHCPv6.DUIDType, config_parse_duid_type,
|
||||
DHCPv6.DUIDRawData, config_parse_duid_rawdata, 0, offsetof(Network, dhcp6_duid)
|
||||
DHCPv6.RapidCommit, config_parse_bool, 0, offsetof(Network, dhcp6_use_rapid_commit)
|
||||
DHCPv6.NetLabel, config_parse_string, CONFIG_PARSE_STRING_SAFE, offsetof(Network, dhcp6_netlabel)
|
||||
DHCPv6.SendRelease, config_parse_bool, 0, offsetof(Network, dhcp6_send_release)
|
||||
IPv6AcceptRA.UseGateway, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_gateway)
|
||||
IPv6AcceptRA.UseRoutePrefix, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_route_prefix)
|
||||
IPv6AcceptRA.UseAutonomousPrefix, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_autonomous_prefix)
|
||||
|
||||
@@ -416,6 +416,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
||||
.dhcp6_use_rapid_commit = true,
|
||||
.dhcp6_duid.type = _DUID_TYPE_INVALID,
|
||||
.dhcp6_client_start_mode = _DHCP6_CLIENT_START_MODE_INVALID,
|
||||
.dhcp6_send_release = true,
|
||||
|
||||
.dhcp_pd = -1,
|
||||
.dhcp_pd_announce = true,
|
||||
|
||||
@@ -186,6 +186,7 @@ struct Network {
|
||||
OrderedHashmap *dhcp6_client_send_vendor_options;
|
||||
Set *dhcp6_request_options;
|
||||
char *dhcp6_netlabel;
|
||||
bool dhcp6_send_release;
|
||||
|
||||
/* DHCP Server Support */
|
||||
bool dhcp_server;
|
||||
|
||||
Reference in New Issue
Block a user