]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: ndisc: ignore route prefix to ::/0
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 28 Dec 2021 13:42:03 +0000 (22:42 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 28 Dec 2021 21:00:49 +0000 (21:00 +0000)
Fixes #21912.

src/network/networkd-ndisc.c

index 32cb536ee5e9d545795fad782a13b146b09b63ca..f616f2c9bc71b557e96d2ffdc43e03e746a847f2 100644 (file)
@@ -612,6 +612,11 @@ static int ndisc_router_process_route(Link *link, sd_ndisc_router *rt) {
         if (r < 0)
                 return log_link_error_errno(link, r, "Failed to get route prefix length: %m");
 
+        if (in6_addr_is_null(&dst) && prefixlen == 0) {
+                log_link_debug(link, "Route prefix is ::/0, ignoring");
+                return 0;
+        }
+
         if (in6_prefix_is_filtered(&dst, prefixlen, link->network->ndisc_allow_listed_route_prefix, link->network->ndisc_deny_listed_route_prefix)) {
                 if (DEBUG_LOGGING) {
                         _cleanup_free_ char *buf = NULL;