diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2014-03-06 17:51:57 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-06 23:29:27 +0100 |
commit | c88507fbad8055297c1d1e21e599f46960cbee39 (patch) | |
tree | 6096363b9a553bca322108f23db2fe1f348d3fd1 /net/ipv6/route.c | |
parent | net/mlx4_core: mlx4_init_slave() shouldn't access comm channel before PF is r... (diff) | |
download | linux-c88507fbad8055297c1d1e21e599f46960cbee39.tar.xz linux-c88507fbad8055297c1d1e21e599f46960cbee39.zip |
ipv6: don't set DST_NOCOUNT for remotely added routes
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@queasysnail.net>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 11dac21e6586..fba54a407bb2 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1513,7 +1513,7 @@ int ip6_route_add(struct fib6_config *cfg) if (!table) goto out; - rt = ip6_dst_alloc(net, NULL, DST_NOCOUNT, table); + rt = ip6_dst_alloc(net, NULL, (cfg->fc_flags & RTF_ADDRCONF) ? 0 : DST_NOCOUNT, table); if (!rt) { err = -ENOMEM; |