summaryrefslogtreecommitdiff
path: root/net/sctp
diff options
context:
space:
mode:
authorwangweidong <wangweidong1@huawei.com>2014-02-12 05:44:43 +0400
committerDavid S. Miller <davem@davemloft.net>2014-02-14 02:08:29 +0400
commit22a1f5140ed69baa5906ce9b2b9143478f5a4da0 (patch)
treefad559ed9ca469c2bea6bbd982cbc76ce784cb90 /net/sctp
parent0e0eee2465df77bcec2e8ff75432b8e57897b143 (diff)
downloadlinux-22a1f5140ed69baa5906ce9b2b9143478f5a4da0.tar.xz
sctp: fix a missed .data initialization
As commit 3c68198e75111a90("sctp: Make hmac algorithm selection for cookie generation dynamic"), we miss the .data initialization. If we don't use the net_namespace, the problem that parts of the sysctl configuration won't be isolation and won't occur. In sctp_sysctl_net_register(), we register the sysctl for each net, in the for(), we use the 'table[i].data' as check condition, so when the 'i' is the index of sctp_hmac_alg, the data is NULL, then break. So add the .data initialization. Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sysctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 7135e617ab0f..d354de5a6fe0 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -151,6 +151,7 @@ static struct ctl_table sctp_net_table[] = {
},
{
.procname = "cookie_hmac_alg",
+ .data = &init_net.sctp.sctp_hmac_alg,
.maxlen = 8,
.mode = 0644,
.proc_handler = proc_sctp_do_hmac_alg,