Skip to content

Commit a3300ef

Browse files
strssndktndavem330
authored andcommitted
ipv6: don't count addrconf generated routes against gc limit
Brett Ciphery reported that new ipv6 addresses failed to get installed because the addrconf generated dsts where counted against the dst gc limit. We don't need to count those routes like we currently don't count administratively added routes. Because the max_addresses check enforces a limit on unbounded address generation first in case someone plays with router advertisments, we are still safe here. Reported-by: Brett Ciphery <brett.ciphery@windriver.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6a46ff8 commit a3300ef

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎net/ipv6/route.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,12 +2166,10 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
21662166
bool anycast)
21672167
{
21682168
struct net *net = dev_net(idev->dev);
2169-
struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev, 0, NULL);
2170-
2171-
if (!rt) {
2172-
net_warn_ratelimited("Maximum number of routes reached, consider increasing route/max_size\n");
2169+
struct rt6_info *rt = ip6_dst_alloc(net, net->loopback_dev,
2170+
DST_NOCOUNT, NULL);
2171+
if (!rt)
21732172
return ERR_PTR(-ENOMEM);
2174-
}
21752173

21762174
in6_dev_hold(idev);
21772175

0 commit comments

Comments
 (0)