From e373507d2570fe474a09fd6e3836ead32dca912f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 10 Jun 2016 23:26:24 +0200 Subject: 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 --- src/network/networkd-route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 6359f967a2..52037f9c6d 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -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, -- cgit v1.2.3-54-g00ecf