Skip to contentSkip to conversation

ipv6: Warn users if maximum number of routes is reached.

PATCH Applied Ben Greear 2 participants 2 messages Nov 8, 2010 – Nov 12, 2010

Subsystems (3)
lore
Share & tools
lore

Ben Greear

author
#0 lore raw

PATCH v2 2/2 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.

---

v1 -> v2: Put warning in correct place.

:100644 100644 a275c6e... 9d9d0e9... M net/ipv6/route.c

 net/ipv6/route.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
net/ipv6/route.c +5 -1
index a275c6e..9d9d0e9 100644
@@ -1941,8 +1941,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);
Signature · 1 line
1.6.2.5