From: Yu Watanabe Date: Tue, 28 Dec 2021 13:42:03 +0000 (+0900) Subject: network: ndisc: ignore route prefix to ::/0 X-Git-Tag: v251-rc1~633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80bfc3b901317ca7c1aaede0cd69150789a6e9be;p=thirdparty%2Fsystemd.git network: ndisc: ignore route prefix to ::/0 Fixes #21912. --- diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 32cb536ee5e..f616f2c9bc7 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -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;