From: Yu Watanabe Date: Tue, 2 Jan 2024 19:42:22 +0000 (+0900) Subject: network/route: make the route section invalid when an invalid MTUBytes= is specified X-Git-Tag: v256-rc1~1306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18c4c5d84f756b144a1823f3de8bc0e61264b976;p=thirdparty%2Fsystemd.git network/route: make the route section invalid when an invalid MTUBytes= is specified We usually set the invalid flag for a section if a setting in the section has an invalid value. Let's also do the same thing for MTUBytes= in [Route]. --- diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index e7cc252243b..72dbf9ed067 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -2814,7 +2814,7 @@ int config_parse_route_mtu( } r = config_parse_mtu(unit, filename, line, section, section_line, lvalue, ltype, rvalue, &n->mtu, userdata); - if (r < 0) + if (r <= 0) return r; TAKE_PTR(n); diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 5d4500cb05b..1d201528ace 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -1592,7 +1592,7 @@ int config_parse_mtu( return 0; } - return 0; + return 1; } int config_parse_rlimit(