From: Yu Watanabe Date: Thu, 13 Aug 2020 09:55:06 +0000 (+0900) Subject: network: set default priority for IPv6 routes X-Git-Tag: v247-rc1~110^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8973df5c42a292d36e3828c35104c9cd03711f4a;p=thirdparty%2Fsystemd.git network: set default priority for IPv6 routes See inet6_rtm_newroute() in kernel's net/ipv6/route.c. --- diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 659fecbf2e5..1b725c1a2d1 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "alloc-util.h" #include "netlink-util.h" @@ -2200,6 +2201,9 @@ static int route_section_verify(Route *route, Network *network) { route->scope = RT_SCOPE_LINK; } + if (route->family == AF_INET6 && route->priority == 0) + route->priority = IP6_RT_PRIO_USER; + if (ordered_hashmap_isempty(network->addresses_by_section) && in_addr_is_null(route->family, &route->gw) == 0 && route->gateway_onlink < 0) {