]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: ignore Scope= for IPv6 routes as it will not be used
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 13 Aug 2020 15:04:00 +0000 (00:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Oct 2020 13:22:10 +0000 (15:22 +0200)
src/network/networkd-route.c

index 1b725c1a2d188f2fd76f6257247c21c626db05aa..870de18b8cfb0077faf5ca3ad8449f7d00224549 100644 (file)
@@ -2201,6 +2201,11 @@ static int route_section_verify(Route *route, Network *network) {
                         route->scope = RT_SCOPE_LINK;
         }
 
+        if (route->scope != RT_SCOPE_UNIVERSE && route->family == AF_INET6) {
+                log_warning("%s: Scope= is specified for IPv6 route. It will be ignored.", route->section->filename);
+                route->scope = RT_SCOPE_UNIVERSE;
+        }
+
         if (route->family == AF_INET6 && route->priority == 0)
                 route->priority = IP6_RT_PRIO_USER;