1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

networkd: fix bad memory access for routes that are note attached to a link yet (#3499)

Corrects: 1b566071

Also see: https://github.com/systemd/systemd/pull/3478#issuecomment-225008542
This commit is contained in:
Lennart Poettering 2016-06-10 23:26:24 +02:00 committed by GitHub
parent 64c3610b55
commit e373507d25

View 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,