From: Yu Watanabe Date: Fri, 28 Oct 2022 02:33:19 +0000 (+0900) Subject: network: allow 0 for table number X-Git-Tag: v252~22^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=513bed294ef73566b170bd6943da702571278b1c;p=thirdparty%2Fsystemd.git network: allow 0 for table number Fixes #25089. --- diff --git a/src/network/networkd-route-util.c b/src/network/networkd-route-util.c index 312f5f298a5..03663820931 100644 --- a/src/network/networkd-route-util.c +++ b/src/network/networkd-route-util.c @@ -417,8 +417,8 @@ int manager_get_route_table_to_string(const Manager *m, uint32_t table, char **r assert(m); assert(ret); - if (table == 0) - return -EINVAL; + /* Unlike manager_get_route_table_from_string(), this accepts 0, as the kernel may create routes with + * table 0. See issue #25089. */ s = route_table_to_string(table); if (!s)