These settings are leated to sd-ndisc and Neighbor Discovery protocol.
Let's use more suitable name.
return link_get_vrf_table(link);
}
-uint32_t link_get_ipv6_accept_ra_route_table(Link *link) {
+uint32_t link_get_ndisc_route_table(Link *link) {
assert(link);
assert(link->network);
- if (link->network->ipv6_accept_ra_route_table_set)
- return link->network->ipv6_accept_ra_route_table;
+ if (link->network->ndisc_route_table_set)
+ return link->network->ndisc_route_table;
return link_get_vrf_table(link);
}
return r;
}
- if (link->network->ipv6_accept_ra_use_captive_portal) {
+ if (link->network->ndisc_use_captive_portal) {
NDiscCaptivePortal *cp;
usec_t usec = 0;
/* For backward compatibility. */
if (!network->dhcp_route_metric_set)
network->dhcp_route_metric = metric;
- if (!network->ipv6_accept_ra_route_metric_set) {
- network->ipv6_accept_ra_route_metric_high = metric;
- network->ipv6_accept_ra_route_metric_medium = metric;
- network->ipv6_accept_ra_route_metric_low = metric;
+ if (!network->ndisc_route_metric_set) {
+ network->ndisc_route_metric_high = metric;
+ network->ndisc_route_metric_medium = metric;
+ network->ndisc_route_metric_low = metric;
}
break;
default:
return 0;
}
-int config_parse_ipv6_accept_ra_route_metric(
+int config_parse_ndisc_route_metric(
const char *unit,
const char *filename,
unsigned line,
}
}
- network->ipv6_accept_ra_route_metric_high = metric_high;
- network->ipv6_accept_ra_route_metric_medium = metric_medium;
- network->ipv6_accept_ra_route_metric_low = metric_low;
- network->ipv6_accept_ra_route_metric_set = true;
+ network->ndisc_route_metric_high = metric_high;
+ network->ndisc_route_metric_medium = metric_medium;
+ network->ndisc_route_metric_low = metric_low;
+ network->ndisc_route_metric_set = true;
return 0;
}
network->dhcp_route_table_set = true;
break;
case AF_INET6:
- network->ipv6_accept_ra_route_table = rt;
- network->ipv6_accept_ra_route_table_set = true;
+ network->ndisc_route_table = rt;
+ network->ndisc_route_table_set = true;
break;
default:
assert_not_reached();
} DUID;
uint32_t link_get_dhcp4_route_table(Link *link);
-uint32_t link_get_ipv6_accept_ra_route_table(Link *link);
+uint32_t link_get_ndisc_route_table(Link *link);
bool link_dhcp_enabled(Link *link, int family);
static inline bool link_dhcp4_enabled(Link *link) {
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_route_metric);
-CONFIG_PARSER_PROTOTYPE(config_parse_ipv6_accept_ra_route_metric);
+CONFIG_PARSER_PROTOTYPE(config_parse_ndisc_route_metric);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_send_hostname);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_use_dns);
CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_use_domains);
assert(link);
- if (!link_dhcp6_enabled(link) && !link_ipv6_accept_ra_enabled(link))
+ if (!link_dhcp6_enabled(link) && !link_ndisc_enabled(link))
return 0;
if (link->dhcp6_client)
}
}
- if (link->network->ipv6_accept_ra_use_dns) {
+ if (link->network->ndisc_use_dns) {
NDiscRDNSS *a;
SET_FOREACH(a, link->ndisc_rdnss) {
}
}
- if (link->network->ipv6_accept_ra_use_domains == use_domains) {
+ if (link->network->ndisc_use_domains == use_domains) {
NDiscDNSSL *a;
SET_FOREACH(a, link->ndisc_dnssl) {
assert(link);
assert(v);
- if (!link->network || !link->network->ipv6_accept_ra_use_pref64)
+ if (!link->network || !link->network->ndisc_use_pref64)
return 0;
SET_FOREACH(i, link->ndisc_pref64) {
* Note, ignore NDisc when ConfigureWithoutCarrier= is enabled, as IPv6AcceptRA= is enabled by default. */
if (!link_ipv4ll_enabled(link) && !link_dhcp4_enabled(link) &&
!link_dhcp6_enabled(link) && !link_dhcp_pd_is_enabled(link) &&
- (link->network->configure_without_carrier || !link_ipv6_accept_ra_enabled(link)))
+ (link->network->configure_without_carrier || !link_ndisc_enabled(link)))
goto ready;
bool ipv4ll_ready =
(!link->network->dhcp_pd_assign ||
link_check_addresses_ready(link, NETWORK_CONFIG_SOURCE_DHCP_PD));
bool ndisc_ready =
- link_ipv6_accept_ra_enabled(link) && link->ndisc_configured &&
- (!link->network->ipv6_accept_ra_use_autonomous_prefix ||
+ link_ndisc_enabled(link) && link->ndisc_configured &&
+ (!link->network->ndisc_use_autonomous_prefix ||
link_check_addresses_ready(link, NETWORK_CONFIG_SOURCE_NDISC));
/* If the uplink for PD is self, then request the corresponding DHCP protocol is also ready. */
* Not sure if the threshold is high enough. Let's adjust later if not. */
#define NDISC_PREF64_MAX 64U
-bool link_ipv6_accept_ra_enabled(Link *link) {
+bool link_ndisc_enabled(Link *link) {
assert(link);
if (!socket_ipv6_is_supported())
if (!link_may_have_ipv6ll(link, /* check_multicast = */ true))
return false;
- if (link->network->ipv6_accept_ra >= 0)
- return link->network->ipv6_accept_ra;
+ if (link->network->ndisc >= 0)
+ return link->network->ndisc;
/* Accept RAs if IPv6 forwarding is disabled, and ignore RAs if IPv6 forwarding is enabled. */
int t = link_get_ip_forwarding(link, AF_INET6);
return true;
}
-void network_adjust_ipv6_accept_ra(Network *network) {
+void network_adjust_ndisc(Network *network) {
assert(network);
if (!FLAGS_SET(network->link_local, ADDRESS_FAMILY_IPV6)) {
- if (network->ipv6_accept_ra > 0)
+ if (network->ndisc > 0)
log_warning("%s: IPv6AcceptRA= is enabled but IPv6 link-local addressing is disabled or not supported. "
"Disabling IPv6AcceptRA=.", network->filename);
- network->ipv6_accept_ra = false;
+ network->ndisc = false;
}
/* When RouterAllowList=, PrefixAllowList= or RouteAllowList= are specified, then
switch (route->pref) {
case SD_NDISC_PREFERENCE_LOW:
- route->priority = link->network->ipv6_accept_ra_route_metric_low;
+ route->priority = link->network->ndisc_route_metric_low;
break;
case SD_NDISC_PREFERENCE_MEDIUM:
- route->priority = link->network->ipv6_accept_ra_route_metric_medium;
+ route->priority = link->network->ndisc_route_metric_medium;
break;
case SD_NDISC_PREFERENCE_HIGH:
- route->priority = link->network->ipv6_accept_ra_route_metric_high;
+ route->priority = link->network->ndisc_route_metric_high;
break;
default:
assert_not_reached();
if (r < 0)
return r;
- if (link->network->ipv6_accept_ra_use_mtu) {
+ if (link->network->ndisc_use_mtu) {
r = sd_ndisc_router_get_mtu(rt, &mtu);
if (r < 0 && r != -ENODATA)
return log_link_warning_errno(link, r, "Failed to get MTU from RA: %m");
}
- if (link->network->ipv6_accept_ra_use_hop_limit) {
+ if (link->network->ndisc_use_hop_limit) {
r = sd_ndisc_router_get_hop_limit(rt, &hop_limit);
if (r < 0 && r != -ENODATA)
return log_link_warning_errno(link, r, "Failed to get hop limit from RA: %m");
route->source = NETWORK_CONFIG_SOURCE_NDISC;
route->provider.in6 = router;
if (!route->table_set)
- route->table = link_get_ipv6_accept_ra_route_table(link);
+ route->table = link_get_ndisc_route_table(link);
if (!route->protocol_set)
route->protocol = RTPROT_RA;
r = route_metric_set(&route->metric, RTAX_MTU, mtu);
r = route_metric_set(&route->metric, RTAX_HOPLIMIT, hop_limit);
if (r < 0)
return r;
- r = route_metric_set(&route->metric, RTAX_QUICKACK, link->network->ipv6_accept_ra_quickack);
+ r = route_metric_set(&route->metric, RTAX_QUICKACK, link->network->ndisc_quickack);
if (r < 0)
return r;
ndisc_set_route_priority(link, route);
if (!route->table_set)
- route->table = link_get_ipv6_accept_ra_route_table(link);
+ route->table = link_get_ndisc_route_table(link);
r = route_adjust_nexthops(route, link);
if (r < 0)
if (r == 0)
return ndisc_router_drop_default(link, rt);
- if (!link->network->ipv6_accept_ra_use_gateway &&
+ if (!link->network->ndisc_use_gateway &&
hashmap_isempty(link->network->routes_by_section))
return 0;
if (r < 0)
return log_link_warning_errno(link, r, "Failed to get router preference from RA: %m");
- if (link->network->ipv6_accept_ra_use_gateway) {
+ if (link->network->ndisc_use_gateway) {
_cleanup_(route_unrefp) Route *route = NULL;
r = route_new(&route);
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_icmp6_ratelimit)
+ if (!link->network->ndisc_use_icmp6_ratelimit)
return 0;
/* Ignore the icmp6 ratelimit field of the RA header if the lifetime is zero. */
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_reachable_time)
+ if (!link->network->ndisc_use_reachable_time)
return 0;
/* Ignore the reachable time field of the RA header if the lifetime is zero. */
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_retransmission_time)
+ if (!link->network->ndisc_use_retransmission_time)
return 0;
/* Ignore the retransmission time field of the RA header if the lifetime is zero. */
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_hop_limit)
+ if (!link->network->ndisc_use_hop_limit)
return 0;
/* Ignore the hop limit field of the RA header if the lifetime is zero. */
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_autonomous_prefix)
+ if (!link->network->ndisc_use_autonomous_prefix)
return 0;
r = sd_ndisc_router_prefix_get_address(rt, &prefix);
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_onlink_prefix)
+ if (!link->network->ndisc_use_onlink_prefix)
return 0;
r = sd_ndisc_router_prefix_get_valid_lifetime_timestamp(rt, CLOCK_BOOTTIME, &lifetime_usec);
* covered by the prefix are off-link. The only way to cancel a previous on-link indication is to
* advertise that prefix with the L-bit set and the Lifetime set to zero. */
- if (!link->network->ipv6_accept_ra_use_onlink_prefix)
+ if (!link->network->ndisc_use_onlink_prefix)
return 0;
r = sd_ndisc_router_prefix_get_valid_lifetime(rt, &lifetime_usec);
assert(link);
- if (!link->network->ipv6_accept_ra_use_route_prefix)
+ if (!link->network->ndisc_use_route_prefix)
return 0;
r = sd_ndisc_router_route_get_lifetime_timestamp(rt, CLOCK_BOOTTIME, &lifetime_usec);
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_dns)
+ if (!link->network->ndisc_use_dns)
return 0;
r = sd_ndisc_router_get_address(rt, &router);
assert(link->network);
assert(rt);
- if (link->network->ipv6_accept_ra_use_domains == DHCP_USE_DOMAINS_NO)
+ if (link->network->ndisc_use_domains == DHCP_USE_DOMAINS_NO)
return 0;
r = sd_ndisc_router_get_address(rt, &router);
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_captive_portal)
+ if (!link->network->ndisc_use_captive_portal)
return 0;
r = sd_ndisc_router_get_address(rt, &router);
assert(link->network);
assert(rt);
- if (!link->network->ipv6_accept_ra_use_pref64)
+ if (!link->network->ndisc_use_pref64)
return 0;
r = sd_ndisc_router_get_address(rt, &router);
if (r <= 0)
return r;
- switch (link->network->ipv6_accept_ra_start_dhcp6_client) {
+ switch (link->network->ndisc_start_dhcp6_client) {
case IPV6_ACCEPT_RA_START_DHCP6_CLIENT_NO:
return 0;
assert(link);
- if (!link_ipv6_accept_ra_enabled(link))
+ if (!link_ndisc_enabled(link))
return 0;
if (link->ndisc)
assert(link);
- if (!link_ipv6_accept_ra_enabled(link))
+ if (!link_ndisc_enabled(link))
return 0;
if (link->ndisc)
link->ndisc_pref64 = set_free(link->ndisc_pref64);
}
-static const char* const ipv6_accept_ra_start_dhcp6_client_table[_IPV6_ACCEPT_RA_START_DHCP6_CLIENT_MAX] = {
+static const char* const ndisc_start_dhcp6_client_table[_IPV6_ACCEPT_RA_START_DHCP6_CLIENT_MAX] = {
[IPV6_ACCEPT_RA_START_DHCP6_CLIENT_NO] = "no",
[IPV6_ACCEPT_RA_START_DHCP6_CLIENT_ALWAYS] = "always",
[IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES] = "yes",
};
-DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(ipv6_accept_ra_start_dhcp6_client, IPv6AcceptRAStartDHCP6Client, IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES);
+DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(ndisc_start_dhcp6_client, IPv6AcceptRAStartDHCP6Client, IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES);
-DEFINE_CONFIG_PARSE_ENUM(config_parse_ipv6_accept_ra_use_domains, dhcp_use_domains, DHCPUseDomains,
+DEFINE_CONFIG_PARSE_ENUM(config_parse_ndisc_use_domains, dhcp_use_domains, DHCPUseDomains,
"Failed to parse UseDomains= setting");
-DEFINE_CONFIG_PARSE_ENUM(config_parse_ipv6_accept_ra_start_dhcp6_client, ipv6_accept_ra_start_dhcp6_client, IPv6AcceptRAStartDHCP6Client,
+DEFINE_CONFIG_PARSE_ENUM(config_parse_ndisc_start_dhcp6_client, ndisc_start_dhcp6_client, IPv6AcceptRAStartDHCP6Client,
"Failed to parse DHCPv6Client= setting");
return ((char*) n) + ALIGN(sizeof(NDiscDNSSL));
}
-bool link_ipv6_accept_ra_enabled(Link *link);
+bool link_ndisc_enabled(Link *link);
-void network_adjust_ipv6_accept_ra(Network *network);
+void network_adjust_ndisc(Network *network);
int ndisc_start(Link *link);
int ndisc_stop(Link *link);
int link_request_ndisc(Link *link);
-CONFIG_PARSER_PROTOTYPE(config_parse_ipv6_accept_ra_start_dhcp6_client);
-CONFIG_PARSER_PROTOTYPE(config_parse_ipv6_accept_ra_use_domains);
+CONFIG_PARSER_PROTOTYPE(config_parse_ndisc_start_dhcp6_client);
+CONFIG_PARSER_PROTOTYPE(config_parse_ndisc_use_domains);
Network.IPv6Forwarding, config_parse_tristate, 0, offsetof(Network, ip_forwarding[1])
Network.IPMasquerade, config_parse_ip_masquerade, 0, offsetof(Network, ip_masquerade)
Network.IPv6PrivacyExtensions, config_parse_ipv6_privacy_extensions, 0, offsetof(Network, ipv6_privacy_extensions)
-Network.IPv6AcceptRA, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)
-Network.IPv6AcceptRouterAdvertisements, config_parse_tristate, 0, offsetof(Network, ipv6_accept_ra)
+Network.IPv6AcceptRA, config_parse_tristate, 0, offsetof(Network, ndisc)
+Network.IPv6AcceptRouterAdvertisements, config_parse_tristate, 0, offsetof(Network, ndisc)
Network.IPv6DuplicateAddressDetection, config_parse_int, 0, offsetof(Network, ipv6_dad_transmits)
Network.IPv6HopLimit, config_parse_uint8, 0, offsetof(Network, ipv6_hop_limit)
Network.IPv6RetransmissionTimeSec, config_parse_sec, 0, offsetof(Network, ipv6_retransmission_time)
DHCPv6.NetLabel, config_parse_string, CONFIG_PARSE_STRING_SAFE, offsetof(Network, dhcp6_netlabel)
DHCPv6.SendRelease, config_parse_bool, 0, offsetof(Network, dhcp6_send_release)
DHCPv6.NFTSet, config_parse_nft_set, NFT_SET_PARSE_NETWORK, offsetof(Network, dhcp6_nft_set_context)
-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)
-IPv6AcceptRA.UseOnLinkPrefix, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_onlink_prefix)
-IPv6AcceptRA.UsePREF64, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_pref64)
-IPv6AcceptRA.UseDNS, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_dns)
-IPv6AcceptRA.UseDomains, config_parse_ipv6_accept_ra_use_domains, 0, offsetof(Network, ipv6_accept_ra_use_domains)
-IPv6AcceptRA.UseMTU, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_mtu)
-IPv6AcceptRA.UseHopLimit, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_hop_limit)
-IPv6AcceptRA.UseReachableTime, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_reachable_time)
-IPv6AcceptRA.UseRetransmissionTime, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_retransmission_time)
-IPv6AcceptRA.UseICMP6RateLimit, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_icmp6_ratelimit)
-IPv6AcceptRA.DHCPv6Client, config_parse_ipv6_accept_ra_start_dhcp6_client, 0, offsetof(Network, ipv6_accept_ra_start_dhcp6_client)
+IPv6AcceptRA.UseGateway, config_parse_bool, 0, offsetof(Network, ndisc_use_gateway)
+IPv6AcceptRA.UseRoutePrefix, config_parse_bool, 0, offsetof(Network, ndisc_use_route_prefix)
+IPv6AcceptRA.UseAutonomousPrefix, config_parse_bool, 0, offsetof(Network, ndisc_use_autonomous_prefix)
+IPv6AcceptRA.UseOnLinkPrefix, config_parse_bool, 0, offsetof(Network, ndisc_use_onlink_prefix)
+IPv6AcceptRA.UsePREF64, config_parse_bool, 0, offsetof(Network, ndisc_use_pref64)
+IPv6AcceptRA.UseDNS, config_parse_bool, 0, offsetof(Network, ndisc_use_dns)
+IPv6AcceptRA.UseDomains, config_parse_ndisc_use_domains, 0, offsetof(Network, ndisc_use_domains)
+IPv6AcceptRA.UseMTU, config_parse_bool, 0, offsetof(Network, ndisc_use_mtu)
+IPv6AcceptRA.UseHopLimit, config_parse_bool, 0, offsetof(Network, ndisc_use_hop_limit)
+IPv6AcceptRA.UseReachableTime, config_parse_bool, 0, offsetof(Network, ndisc_use_reachable_time)
+IPv6AcceptRA.UseRetransmissionTime, config_parse_bool, 0, offsetof(Network, ndisc_use_retransmission_time)
+IPv6AcceptRA.UseICMP6RateLimit, config_parse_bool, 0, offsetof(Network, ndisc_use_icmp6_ratelimit)
+IPv6AcceptRA.DHCPv6Client, config_parse_ndisc_start_dhcp6_client, 0, offsetof(Network, ndisc_start_dhcp6_client)
IPv6AcceptRA.RouteTable, config_parse_dhcp_or_ra_route_table, AF_INET6, 0
-IPv6AcceptRA.RouteMetric, config_parse_ipv6_accept_ra_route_metric, 0, 0
-IPv6AcceptRA.QuickAck, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_quickack)
-IPv6AcceptRA.UseCaptivePortal, config_parse_bool, 0, offsetof(Network, ipv6_accept_ra_use_captive_portal)
+IPv6AcceptRA.RouteMetric, config_parse_ndisc_route_metric, 0, 0
+IPv6AcceptRA.QuickAck, config_parse_bool, 0, offsetof(Network, ndisc_quickack)
+IPv6AcceptRA.UseCaptivePortal, config_parse_bool, 0, offsetof(Network, ndisc_use_captive_portal)
IPv6AcceptRA.RouterAllowList, config_parse_in_addr_prefixes, AF_INET6, offsetof(Network, ndisc_allow_listed_router)
IPv6AcceptRA.RouterDenyList, config_parse_in_addr_prefixes, AF_INET6, offsetof(Network, ndisc_deny_listed_router)
IPv6AcceptRA.PrefixAllowList, config_parse_in_addr_prefixes, AF_INET6, offsetof(Network, ndisc_allow_listed_prefix)
DHCP.ForceDHCPv6PDOtherInformation, config_parse_warn_compat, DISABLED_LEGACY, 0
DHCPv4.UseDomainName, config_parse_dhcp_use_domains, AF_INET, 0
DHCPv4.CriticalConnection, config_parse_tristate, 0, offsetof(Network, dhcp_critical)
-DHCPv6.RouteMetric, config_parse_ipv6_accept_ra_route_metric, AF_INET6, 0
+DHCPv6.RouteMetric, config_parse_ndisc_route_metric, AF_INET6, 0
DHCPv6.ForceDHCPv6PDOtherInformation, config_parse_warn_compat, DISABLED_LEGACY, 0
DHCPv6PrefixDelegation.SubnetId, config_parse_dhcp_pd_subnet_id, 0, offsetof(Network, dhcp_pd_subnet_id)
DHCPv6PrefixDelegation.Announce, config_parse_bool, 0, offsetof(Network, dhcp_pd_announce)
network->ipv6ll_address_gen_mode = IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_STABLE_PRIVACY;
network_adjust_ipv6_proxy_ndp(network);
- network_adjust_ipv6_accept_ra(network);
+ network_adjust_ndisc(network);
network_adjust_dhcp(network);
network_adjust_radv(network);
network_adjust_bridge_vlan(network);
.proxy_arp_pvlan = -1,
.ipv4_rp_filter = _IP_REVERSE_PATH_FILTER_INVALID,
- .ipv6_accept_ra = -1,
- .ipv6_accept_ra_use_dns = true,
- .ipv6_accept_ra_use_gateway = true,
- .ipv6_accept_ra_use_captive_portal = true,
- .ipv6_accept_ra_use_route_prefix = true,
- .ipv6_accept_ra_use_autonomous_prefix = true,
- .ipv6_accept_ra_use_onlink_prefix = true,
- .ipv6_accept_ra_use_mtu = true,
- .ipv6_accept_ra_use_hop_limit = true,
- .ipv6_accept_ra_use_reachable_time = true,
- .ipv6_accept_ra_use_retransmission_time = true,
- .ipv6_accept_ra_use_icmp6_ratelimit = true,
- .ipv6_accept_ra_route_table = RT_TABLE_MAIN,
- .ipv6_accept_ra_route_metric_high = IPV6RA_ROUTE_METRIC_HIGH,
- .ipv6_accept_ra_route_metric_medium = IPV6RA_ROUTE_METRIC_MEDIUM,
- .ipv6_accept_ra_route_metric_low = IPV6RA_ROUTE_METRIC_LOW,
- .ipv6_accept_ra_start_dhcp6_client = IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES,
+ .ndisc = -1,
+ .ndisc_use_dns = true,
+ .ndisc_use_gateway = true,
+ .ndisc_use_captive_portal = true,
+ .ndisc_use_route_prefix = true,
+ .ndisc_use_autonomous_prefix = true,
+ .ndisc_use_onlink_prefix = true,
+ .ndisc_use_mtu = true,
+ .ndisc_use_hop_limit = true,
+ .ndisc_use_reachable_time = true,
+ .ndisc_use_retransmission_time = true,
+ .ndisc_use_icmp6_ratelimit = true,
+ .ndisc_route_table = RT_TABLE_MAIN,
+ .ndisc_route_metric_high = IPV6RA_ROUTE_METRIC_HIGH,
+ .ndisc_route_metric_medium = IPV6RA_ROUTE_METRIC_MEDIUM,
+ .ndisc_route_metric_low = IPV6RA_ROUTE_METRIC_LOW,
+ .ndisc_start_dhcp6_client = IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES,
.can_termination = -1,
int ipv6_proxy_ndp;
Set *ipv6_proxy_ndp_addresses;
- /* IPv6 accept RA */
- int ipv6_accept_ra;
- bool ipv6_accept_ra_use_dns;
- bool ipv6_accept_ra_use_gateway;
- bool ipv6_accept_ra_use_route_prefix;
- bool ipv6_accept_ra_use_autonomous_prefix;
- bool ipv6_accept_ra_use_onlink_prefix;
- bool ipv6_accept_ra_use_mtu;
- bool ipv6_accept_ra_use_hop_limit;
- bool ipv6_accept_ra_use_reachable_time;
- bool ipv6_accept_ra_use_retransmission_time;
- bool ipv6_accept_ra_use_icmp6_ratelimit;
- bool ipv6_accept_ra_quickack;
- bool ipv6_accept_ra_use_captive_portal;
- bool ipv6_accept_ra_use_pref64;
+ /* NDisc support */
+ int ndisc;
+ bool ndisc_use_dns;
+ bool ndisc_use_gateway;
+ bool ndisc_use_route_prefix;
+ bool ndisc_use_autonomous_prefix;
+ bool ndisc_use_onlink_prefix;
+ bool ndisc_use_mtu;
+ bool ndisc_use_hop_limit;
+ bool ndisc_use_reachable_time;
+ bool ndisc_use_retransmission_time;
+ bool ndisc_use_icmp6_ratelimit;
+ bool ndisc_quickack;
+ bool ndisc_use_captive_portal;
+ bool ndisc_use_pref64;
bool active_slave;
bool primary_slave;
- DHCPUseDomains ipv6_accept_ra_use_domains;
- IPv6AcceptRAStartDHCP6Client ipv6_accept_ra_start_dhcp6_client;
- uint32_t ipv6_accept_ra_route_table;
- bool ipv6_accept_ra_route_table_set;
- uint32_t ipv6_accept_ra_route_metric_high;
- uint32_t ipv6_accept_ra_route_metric_medium;
- uint32_t ipv6_accept_ra_route_metric_low;
- bool ipv6_accept_ra_route_metric_set;
+ DHCPUseDomains ndisc_use_domains;
+ IPv6AcceptRAStartDHCP6Client ndisc_start_dhcp6_client;
+ uint32_t ndisc_route_table;
+ bool ndisc_route_table_set;
+ uint32_t ndisc_route_metric_high;
+ uint32_t ndisc_route_metric_medium;
+ uint32_t ndisc_route_metric_low;
+ bool ndisc_route_metric_set;
Set *ndisc_deny_listed_router;
Set *ndisc_allow_listed_router;
Set *ndisc_deny_listed_prefix;
"Ignoring [Route] section from line %u.",
route->section->filename, route->section->line);
- if (route->nexthop.family == AF_INET6 && route->network->ipv6_accept_ra == 0)
+ if (route->nexthop.family == AF_INET6 && route->network->ndisc == 0)
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
"%s: Gateway=\"_ipv6ra\" is specified but IPv6AcceptRA= is disabled. "
"Ignoring [Route] section from line %u.",
}
}
- if (link->network->ipv6_accept_ra_use_dns) {
+ if (link->network->ndisc_use_dns) {
NDiscRDNSS *a;
SET_FOREACH(a, link->ndisc_rdnss) {
}
}
- if (link->network->ipv6_accept_ra_use_domains == use_domains) {
+ if (link->network->ndisc_use_domains == use_domains) {
NDiscDNSSL *a;
SET_FOREACH(a, link->ndisc_dnssl) {
fputstrv(f, domains, NULL, &space);
}
- if (link->network->ipv6_accept_ra_use_domains == use_domains) {
+ if (link->network->ndisc_use_domains == use_domains) {
NDiscDNSSL *dd;
SET_FOREACH(dd, link->ndisc_dnssl)
sd_dhcp6_lease_get_dns,
NULL);
- if (link->network->ipv6_accept_ra_use_dns) {
+ if (link->network->ndisc_use_dns) {
NDiscRDNSS *dd;
SET_FOREACH(dd, link->ndisc_rdnss)