mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
network: introduce Announce= in [DHCPv6PrefixDelegation]
When disabled, the delegated prefixes are not emit by RA. Closes #17353.
This commit is contained in:
parent
e502f94dcf
commit
4afd986753
@ -421,11 +421,14 @@ static int dhcp6_pd_assign_prefix(Link *link, const union in_addr_union *prefix,
|
||||
int r;
|
||||
|
||||
assert(link);
|
||||
assert(link->network);
|
||||
assert(prefix);
|
||||
|
||||
r = radv_add_prefix(link, &prefix->in6, prefix_len, lifetime_preferred, lifetime_valid);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (link->network->dhcp6_pd_announce) {
|
||||
r = radv_add_prefix(link, &prefix->in6, prefix_len, lifetime_preferred, lifetime_valid);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
r = dhcp6_set_pd_route(link, prefix, pd_prefix);
|
||||
if (r < 0)
|
||||
|
@ -283,6 +283,7 @@ BridgeVLAN.PVID, config_parse_brvlan_pvid,
|
||||
BridgeVLAN.VLAN, config_parse_brvlan_vlan, 0, 0
|
||||
BridgeVLAN.EgressUntagged, config_parse_brvlan_untagged, 0, 0
|
||||
DHCPv6PrefixDelegation.SubnetId, config_parse_dhcp6_pd_subnet_id, 0, offsetof(Network, dhcp6_pd_subnet_id)
|
||||
DHCPv6PrefixDelegation.Announce, config_parse_bool, 0, offsetof(Network, dhcp6_pd_announce)
|
||||
DHCPv6PrefixDelegation.Assign, config_parse_bool, 0, offsetof(Network, dhcp6_pd_assign)
|
||||
DHCPv6PrefixDelegation.Token, config_parse_dhcp6_pd_token, 0, offsetof(Network, dhcp6_pd_token)
|
||||
IPv6PrefixDelegation.RouterLifetimeSec, config_parse_sec, 0, offsetof(Network, router_lifetime_usec)
|
||||
|
@ -368,8 +368,9 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
|
||||
.dhcp6_use_dns = true,
|
||||
|
||||
.dhcp6_pd = -1,
|
||||
.dhcp6_pd_subnet_id = -1,
|
||||
.dhcp6_pd_announce = true,
|
||||
.dhcp6_pd_assign = true,
|
||||
.dhcp6_pd_subnet_id = -1,
|
||||
|
||||
.dhcp_server_emit[SD_DHCP_LEASE_DNS].emit = true,
|
||||
.dhcp_server_emit[SD_DHCP_LEASE_NTP].emit = true,
|
||||
|
@ -202,6 +202,7 @@ struct Network {
|
||||
|
||||
/* DHCPv6 Prefix Delegation support */
|
||||
int dhcp6_pd;
|
||||
bool dhcp6_pd_announce;
|
||||
bool dhcp6_pd_assign;
|
||||
int64_t dhcp6_pd_subnet_id;
|
||||
union in_addr_union dhcp6_pd_token;
|
||||
|
@ -137,6 +137,7 @@ SendVendorOption=
|
||||
RouteMetric=
|
||||
[DHCPv6PrefixDelegation]
|
||||
SubnetId=
|
||||
Announce=
|
||||
Assign=
|
||||
Token=
|
||||
[Route]
|
||||
|
Loading…
Reference in New Issue
Block a user