network: set default priority for IPv6 routes
See inet6_rtm_newroute() in kernel's net/ipv6/route.c.
This commit is contained in:
parent
b2f61e0da0
commit
8973df5c42
|
@ -1,6 +1,7 @@
|
||||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||||
|
|
||||||
#include <linux/icmpv6.h>
|
#include <linux/icmpv6.h>
|
||||||
|
#include <linux/ipv6_route.h>
|
||||||
|
|
||||||
#include "alloc-util.h"
|
#include "alloc-util.h"
|
||||||
#include "netlink-util.h"
|
#include "netlink-util.h"
|
||||||
|
@ -2200,6 +2201,9 @@ static int route_section_verify(Route *route, Network *network) {
|
||||||
route->scope = RT_SCOPE_LINK;
|
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) &&
|
if (ordered_hashmap_isempty(network->addresses_by_section) &&
|
||||||
in_addr_is_null(route->family, &route->gw) == 0 &&
|
in_addr_is_null(route->family, &route->gw) == 0 &&
|
||||||
route->gateway_onlink < 0) {
|
route->gateway_onlink < 0) {
|
||||||
|
|
Loading…
Reference in New Issue