From: Yu Watanabe Date: Thu, 4 Feb 2021 15:49:49 +0000 (+0900) Subject: network: refuse IPv4 multipath route for IPv6 route X-Git-Tag: v248-rc1~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40785f53bace11f478c20eb0cf0d42643cf9e230;p=thirdparty%2Fsystemd.git network: refuse IPv4 multipath route for IPv6 route --- diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 474f8a8861d..fca6c032db7 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -2573,6 +2573,17 @@ static int route_section_verify(Route *route, Network *network) { route->gateway_onlink = true; } + if (route->family == AF_INET6) { + MultipathRoute *m; + + ORDERED_SET_FOREACH(m, route->multipath_routes) + if (m->gateway.family == AF_INET) + return log_warning_errno(SYNTHETIC_ERRNO(EINVAL), + "%s: IPv4 multipath route is specified for IPv6 route. " + "Ignoring [Route] section from line %u.", + route->section->filename, route->section->line); + } + return 0; }