mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
Merge pull request #11716 from ssahani/drop-autoconf-address
networkd: ipv6ra allow to ignore addresses
This commit is contained in:
commit
84e4b0b893
@ -1513,6 +1513,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;
|
||||
}
|
||||
|
@ -147,6 +147,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;
|
||||
|
@ -177,6 +177,8 @@ Prefix=
|
||||
UseDomains=
|
||||
RouteTable=
|
||||
UseDNS=
|
||||
UseAutonomousPrefix=
|
||||
UseOnLinkPrefix=
|
||||
[DHCPServer]
|
||||
EmitNTP=
|
||||
PoolSize=
|
||||
|
Loading…
Reference in New Issue
Block a user