]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: fix bad memory access for routes that are note attached to a link yet ...
authorLennart Poettering <lennart@poettering.net>
Fri, 10 Jun 2016 21:26:24 +0000 (23:26 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Jun 2016 21:26:24 +0000 (23:26 +0200)
Corrects: 1b566071

Also see: https://github.com/systemd/systemd/pull/3478#issuecomment-225008542

src/network/networkd-route.c

index 6359f967a2890688a4b5df68fef94f9184e4061e..52037f9c6d1695d54ca2ac747c61c5ced212ad0f 100644 (file)
@@ -492,7 +492,7 @@ int route_configure(
         assert(route->family == AF_INET || route->family == AF_INET6);
 
         if (route_get(link, route->family, &route->dst, route->dst_prefixlen, route->tos, route->priority, route->table, NULL) <= 0 &&
-            set_size(route->link->routes) >= ROUTES_PER_LINK_MAX)
+            set_size(link->routes) >= ROUTES_PER_LINK_MAX)
                 return -E2BIG;
 
         r = sd_rtnl_message_new_route(link->manager->rtnl, &req,