Commit adf044c8 authored by Sven Wegener's avatar Sven Wegener Committed by David S. Miller

net: Add missing extra2 parameter for ip_default_ttl sysctl

Commit 76e6ebfb ("netns: add namespace
parameter to rt_cache_flush") acceses the extra2 parameter of the
ip_default_ttl ctl_table, but it is never set to a meaningful
value. When e84f84f2 ("netns: place
rt_genid into struct net") is applied, we'll oops in
rt_cache_invalidate(). Set extra2 to init_net, to avoid that.
Reported-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: default avatarSven Wegener <sven.wegener@stealer.net>
Tested-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5a4a72d
...@@ -232,6 +232,7 @@ static struct ctl_table ipv4_table[] = { ...@@ -232,6 +232,7 @@ static struct ctl_table ipv4_table[] = {
.mode = 0644, .mode = 0644,
.proc_handler = &ipv4_doint_and_flush, .proc_handler = &ipv4_doint_and_flush,
.strategy = &ipv4_doint_and_flush_strategy, .strategy = &ipv4_doint_and_flush_strategy,
.extra2 = &init_net,
}, },
{ {
.ctl_name = NET_IPV4_NO_PMTU_DISC, .ctl_name = NET_IPV4_NO_PMTU_DISC,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment