summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2017-03-01 15:33:26 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-03-03 13:48:31 +0100
commitda2f27e9e615d1c799c9582b15262458da61fddc (patch)
tree8eb62270f0633752cc4ff645d9e4f5c799e54e5f /net
parent29e09229d9f26129a39462fae0ddabc4d9533989 (diff)
downloadlinux-da2f27e9e615d1c799c9582b15262458da61fddc.tar.bz2
netfilter: nf_conntrack_sip: fix wrong memory initialisation
In commit 82de0be6862cd ("netfilter: Add helper array register/unregister functions"), struct nf_conntrack_helper sip[MAX_PORTS][4] was changed to sip[MAX_PORTS * 4], so the memory init should have been changed to memset(&sip[4 * i], 0, 4 * sizeof(sip[i])); But as the sip[] table is allocated in the BSS, it is already set to 0 Fixes: 82de0be6862cd ("netfilter: Add helper array register/unregister functions") Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_sip.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 24174c520239..0d17894798b5 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -1628,8 +1628,6 @@ static int __init nf_conntrack_sip_init(void)
ports[ports_c++] = SIP_PORT;
for (i = 0; i < ports_c; i++) {
- memset(&sip[i], 0, sizeof(sip[i]));
-
nf_ct_helper_init(&sip[4 * i], AF_INET, IPPROTO_UDP, "sip",
SIP_PORT, ports[i], i, sip_exp_policy,
SIP_EXPECT_MAX,