aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/sysctl_net_ipv6.c
diff options
context:
space:
mode:
authorFlorent Fourcot <florent.fourcot@enst-bretagne.fr>2014-01-17 17:15:05 +0100
committerDavid S. Miller <davem@davemloft.net>2014-01-19 17:12:31 -0800
commit6444f72b4b74f627c51891101e93ba2b94078b0a (patch)
treed5aa20605d13fa3e222e7e1bf1b7b678a295f398 /net/ipv6/sysctl_net_ipv6.c
parentipv6: add a flag to get the flow label used remotly (diff)
downloadlinux-dev-6444f72b4b74f627c51891101e93ba2b94078b0a.tar.xz
linux-dev-6444f72b4b74f627c51891101e93ba2b94078b0a.zip
ipv6: add flowlabel_consistency sysctl
With the introduction of IPV6_FL_F_REFLECT, there is no guarantee of flow label unicity. This patch introduces a new sysctl to protect the old behaviour, enable by default. Changelog of V3: * rename ip6_flowlabel_consistency to flowlabel_consistency * use net_info_ratelimited() * checkpatch cleanups Signed-off-by: Florent Fourcot <florent.fourcot@enst-bretagne.fr> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/sysctl_net_ipv6.c')
-rw-r--r--net/ipv6/sysctl_net_ipv6.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index b51b2688102c..7f405a168822 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -31,6 +31,13 @@ static struct ctl_table ipv6_table_template[] = {
.mode = 0644,
.proc_handler = proc_dointvec
},
+ {
+ .procname = "flowlabel_consistency",
+ .data = &init_net.ipv6.sysctl.flowlabel_consistency,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec
+ },
{ }
};
@@ -59,6 +66,7 @@ static int __net_init ipv6_sysctl_net_init(struct net *net)
goto out;
ipv6_table[0].data = &net->ipv6.sysctl.bindv6only;
ipv6_table[1].data = &net->ipv6.sysctl.anycast_src_echo_reply;
+ ipv6_table[2].data = &net->ipv6.sysctl.flowlabel_consistency;
ipv6_route_table = ipv6_route_sysctl_init(net);
if (!ipv6_route_table)