From: Ben Greear Date: Mon, 8 Nov 2010 12:33:48 +0000 (+0000) Subject: ipv6: Warn users if maximum number of routes is reached. X-Git-Tag: v2.6.37-rc2~20^2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=403856532734317d25ec86ab1e75b8133db7acc6;p=~shefty%2Frdma-dev.git 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv6/route.c b/net/ipv6/route.c index fc328339be9..96455ffb76f 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1945,8 +1945,12 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, struct rt6_info *rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops); struct neighbour *neigh; - if (rt == NULL) + if (rt == NULL) { + if (net_ratelimit()) + pr_warning("IPv6: Maximum number of routes reached," + " consider increasing route/max_size.\n"); return ERR_PTR(-ENOMEM); + } dev_hold(net->loopback_dev); in6_dev_hold(idev);