Skip to content

Commit

Permalink
ipv6: Warn users if maximum number of routes is reached.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
greearb authored and davem330 committed Nov 12, 2010
1 parent cbaf087 commit 4038565
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4038565

Please sign in to comment.