From 8ebafba9f987c21aa5787c8767f2e390b4ec0bc5 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 18 Apr 2021 02:31:13 +0900 Subject: network: move RouteMetric= from [DHCPv6] to [IPv6AcceptRA] As the value is used in the routes in RA. --- src/network/networkd-dhcp-common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/network/networkd-dhcp-common.c') diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c index f09f0ee50e..bb0b204467 100644 --- a/src/network/networkd-dhcp-common.c +++ b/src/network/networkd-dhcp-common.c @@ -332,14 +332,14 @@ int config_parse_dhcp_route_metric( if (streq_ptr(section, "DHCPv4")) { network->dhcp_route_metric = metric; network->dhcp_route_metric_set = true; - } else if (streq_ptr(section, "DHCPv6")) { - network->dhcp6_route_metric = metric; - network->dhcp6_route_metric_set = true; + } else if (STRPTR_IN_SET(section, "DHCPv6", "IPv6AcceptRA")) { + network->ipv6_accept_ra_route_metric = metric; + network->ipv6_accept_ra_route_metric_set = true; } else { /* [DHCP] section */ if (!network->dhcp_route_metric_set) network->dhcp_route_metric = metric; - if (!network->dhcp6_route_metric_set) - network->dhcp6_route_metric = metric; + if (!network->ipv6_accept_ra_route_metric_set) + network->ipv6_accept_ra_route_metric = metric; } return 0; -- cgit v1.2.1