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>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
|
@ -527,10 +527,13 @@ static void ndisc_router_process_options(Link *link, sd_ndisc_router *rt) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & ND_OPT_PI_FLAG_ONLINK)
|
if (link->network->ipv6_accept_ra_use_onlink_prefix)
|
||||||
(void) ndisc_router_process_onlink_prefix(link, rt);
|
if (flags & ND_OPT_PI_FLAG_ONLINK)
|
||||||
if (flags & ND_OPT_PI_FLAG_AUTO)
|
(void) ndisc_router_process_onlink_prefix(link, rt);
|
||||||
(void) ndisc_router_process_autonomous_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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,6 +147,8 @@ DHCP.IAID, config_parse_iaid,
|
||||||
DHCP.ListenPort, config_parse_uint16, 0, offsetof(Network, dhcp_client_port)
|
DHCP.ListenPort, config_parse_uint16, 0, offsetof(Network, dhcp_client_port)
|
||||||
DHCP.RapidCommit, config_parse_bool, 0, offsetof(Network, rapid_commit)
|
DHCP.RapidCommit, config_parse_bool, 0, offsetof(Network, rapid_commit)
|
||||||
DHCP.ForceDHCPv6PDOtherInformation, config_parse_bool, 0, offsetof(Network, dhcp6_force_pd_other_information)
|
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.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.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)
|
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,
|
.multicast = -1,
|
||||||
.allmulticast = -1,
|
.allmulticast = -1,
|
||||||
.ipv6_accept_ra_use_dns = true,
|
.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,
|
.ipv6_accept_ra_route_table = RT_TABLE_MAIN,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,8 @@ struct Network {
|
||||||
uint32_t ipv6_mtu;
|
uint32_t ipv6_mtu;
|
||||||
|
|
||||||
bool ipv6_accept_ra_use_dns;
|
bool ipv6_accept_ra_use_dns;
|
||||||
|
bool ipv6_accept_ra_use_autonomous_prefix;
|
||||||
|
bool ipv6_accept_ra_use_onlink_prefix;
|
||||||
bool active_slave;
|
bool active_slave;
|
||||||
bool primary_slave;
|
bool primary_slave;
|
||||||
DHCPUseDomains ipv6_accept_ra_use_domains;
|
DHCPUseDomains ipv6_accept_ra_use_domains;
|
||||||
|
|
|
@ -177,6 +177,8 @@ Prefix=
|
||||||
UseDomains=
|
UseDomains=
|
||||||
RouteTable=
|
RouteTable=
|
||||||
UseDNS=
|
UseDNS=
|
||||||
|
UseAutonomousPrefix=
|
||||||
|
UseOnLinkPrefix=
|
||||||
[DHCPServer]
|
[DHCPServer]
|
||||||
EmitNTP=
|
EmitNTP=
|
||||||
PoolSize=
|
PoolSize=
|
||||||
|
|
Loading…
Reference in New Issue