ipv6: Warn users if maximum number of routes is reached.
authorBen Greear <greearb@candelatech.com>
Mon, 8 Nov 2010 12:33:48 +0000 (12:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Nov 2010 22:03:24 +0000 (14:03 -0800)
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 <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index fc328339be99f5c0c1fe5ffcb484e72b51b63e90..96455ffb76fb8b92aa90c3a711aa6635d45b91fa 100644 (file)
@@ -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);