mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
networkd: ipv6ra allow to ignore addresses
Allows to ignore prefixes. ``` UseAutonomousPrefix= UseOnLinkPrefix= ``` closes #9582
This commit is contained in:
parent
aa4b6da71b
commit
062c2eea3a
@ -1504,6 +1504,23 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>UseAutonomousPrefix=</varname></term>
|
||||
<listitem>
|
||||
<para>When true (the default), the autonomous prefix received in the Router Advertisement will be used and take
|
||||
precedence over any statically configured ones.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><varname>UseOnLinkPrefix=</varname></term>
|
||||
<listitem>
|
||||
<para>When true (the default), the onlink prefix received in the Router Advertisement will be used and take
|
||||
precedence over any statically configured ones.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
|
@ -527,10 +527,13 @@ static void ndisc_router_process_options(Link *link, sd_ndisc_router *rt) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags & ND_OPT_PI_FLAG_ONLINK)
|
||||
(void) ndisc_router_process_onlink_prefix(link, rt);
|
||||
if (flags & ND_OPT_PI_FLAG_AUTO)
|
||||
(void) ndisc_router_process_autonomous_prefix(link, rt);
|
||||
if (link->network->ipv6_accept_ra_use_onlink_prefix)
|
||||
if (flags & ND_OPT_PI_FLAG_ONLINK)
|
||||
(void) ndisc_router_process_onlink_prefix(link, rt);
|
||||
|
||||
if (link->network->ipv6_accept_ra_use_autonomous_prefix)
|
||||
if (flags & ND_OPT_PI_FLAG_AUTO)
|
||||
(void) ndisc_router_process_autonomous_prefix(link, rt);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -146,6 +146,8 @@ DHCP.IAID, config_parse_iaid,
|
||||
DHCP.ListenPort, config_parse_uint16, 0, offsetof(Network, dhcp_client_port)
|
||||
DHCP.RapidCommit, config_parse_bool, 0, offsetof(Network, rapid_commit)
|
||||
DHCP.ForceDHCPv6PDOtherInformation, config_parse_bool, 0, offsetof(Network, dhcp6_force_pd_other_information)
|
||||
IPv6AcceptRA.UseAutonomousPrefix, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_autonomous_prefix)
|
||||
IPv6AcceptRA.UseOnLinkPrefix, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_onlink_prefix)
|
||||
IPv6AcceptRA.UseDNS, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_dns)
|
||||
IPv6AcceptRA.UseDomains, config_parse_dhcp_use_domains, 0, offsetof(Network, ipv6_accept_ra_use_domains)
|
||||
IPv6AcceptRA.RouteTable, config_parse_uint32, 0, offsetof(Network, ipv6_accept_ra_route_table)
|
||||
|
@ -206,6 +206,8 @@ int network_load_one(Manager *manager, const char *filename) {
|
||||
.multicast = -1,
|
||||
.allmulticast = -1,
|
||||
.ipv6_accept_ra_use_dns = true,
|
||||
.ipv6_accept_ra_use_autonomous_prefix = true,
|
||||
.ipv6_accept_ra_use_onlink_prefix = true,
|
||||
.ipv6_accept_ra_route_table = RT_TABLE_MAIN,
|
||||
};
|
||||
|
||||
|
@ -209,6 +209,8 @@ struct Network {
|
||||
uint32_t ipv6_mtu;
|
||||
|
||||
bool ipv6_accept_ra_use_dns;
|
||||
bool ipv6_accept_ra_use_autonomous_prefix;
|
||||
bool ipv6_accept_ra_use_onlink_prefix;
|
||||
bool active_slave;
|
||||
bool primary_slave;
|
||||
DHCPUseDomains ipv6_accept_ra_use_domains;
|
||||
|
Loading…
x
Reference in New Issue
Block a user