[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1397430142.10849.91.camel@deadeye.wl.decadent.org.uk>
Date: Mon, 14 Apr 2014 00:02:22 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: David Miller <davem@...emloft.net>
Cc: stable@...r.kernel.org, Sabrina Dubroca <sd@...asysnail.net>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
netdev <netdev@...r.kernel.org>
Subject: [PATCH 3.2] ipv6: don't set DST_NOCOUNT for remotely added routes
From: Sabrina Dubroca <sd@...asysnail.net>
commit c88507fbad8055297c1d1e21e599f46960cbee39 upstream.
DST_NOCOUNT should only be used if an authorized user adds routes
locally. In case of routes which are added on behalf of router
advertisments this flag must not get used as it allows an unlimited
number of routes getting added remotely.
Signed-off-by: Sabrina Dubroca <sd@...asysnail.net>
Acked-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
Signed-off-by: David S. Miller <davem@...emloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
This is untested, but looks almost identical to what you sent for 3.4.
Please ack/nak.
Ben.
net/ipv6/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1250,7 +1250,7 @@ int ip6_route_add(struct fib6_config *cf
goto out;
}
- rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, NULL, DST_NOCOUNT);
+ rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, NULL, (cfg->fc_flags & RTF_ADDRCONF) ? 0 : DST_NOCOUNT);
if (rt == NULL) {
err = -ENOMEM;
--
Ben Hutchings
I haven't lost my mind; it's backed up on tape somewhere.
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists