summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-dhcp6.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-10-14 23:00:22 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-10-19 19:36:20 +0200
commit10ab5ed5a859e0c7a8f43fd80611ee5efe6bd61d (patch)
tree717a8291b3fc484611a1c0ef1112720cee3801ce /src/network/networkd-dhcp6.c
parentnetwork: dhcp6pd: set lifetime to routes for assigned prefixes (diff)
downloadsystemd-10ab5ed5a859e0c7a8f43fd80611ee5efe6bd61d.tar.xz
systemd-10ab5ed5a859e0c7a8f43fd80611ee5efe6bd61d.zip
network: dhcp6: explicitly specify metric for unreachable route
For static IPv6 routes without metric is specified, then we use 1024. But such an adjustment is not performed to dynamic routes. So, let's specify the metric explicitly. Otherwise, configured routes will be handled as foreign.
Diffstat (limited to 'src/network/networkd-dhcp6.c')
-rw-r--r--src/network/networkd-dhcp6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 0795ebdd46..2bbad4edbb 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -777,6 +777,7 @@ static int dhcp6_request_unreachable_route(Link *link, const struct in6_addr *ad
route->table = link_get_dhcp6_route_table(link);
route->type = RTN_UNREACHABLE;
route->protocol = RTPROT_DHCP;
+ route->priority = DHCP_ROUTE_METRIC;
route->lifetime = usec_add(timestamp_usec, lifetime_sec * USEC_PER_SEC);
if (route_get(link->manager, NULL, route, &existing) < 0)