Skip to content

Commit 4038565

Browse files
greearbdavem330
authored andcommitted
ipv6: Warn users if maximum number of routes is reached.
This gives users at least some clue as to what the problem might be and how to go about fixing it. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cbaf087 commit 4038565

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

net/ipv6/route.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1945,8 +1945,12 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
19451945
struct rt6_info *rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops);
19461946
struct neighbour *neigh;
19471947

1948-
if (rt == NULL)
1948+
if (rt == NULL) {
1949+
if (net_ratelimit())
1950+
pr_warning("IPv6: Maximum number of routes reached,"
1951+
" consider increasing route/max_size.\n");
19491952
return ERR_PTR(-ENOMEM);
1953+
}
19501954

19511955
dev_hold(net->loopback_dev);
19521956
in6_dev_hold(idev);

0 commit comments

Comments
 (0)