diff options
author | 2012-01-15 16:34:08 +0100 | |
---|---|---|
committer | 2012-06-16 15:08:39 +0200 | |
commit | 3a8fc53a45c444400259e2e285ba414a87061e3d (patch) | |
tree | da62c51c2ec4fbc145a57b1207287c6b82d81e60 /net/netfilter/nf_conntrack_sip.c | |
parent | ipv4: Add interface option to enable routing of 127.0.0.0/8 (diff) | |
download | linux-3a8fc53a45c444400259e2e285ba414a87061e3d.tar.gz linux-3a8fc53a45c444400259e2e285ba414a87061e3d.tar.bz2 linux-3a8fc53a45c444400259e2e285ba414a87061e3d.zip |
netfilter: nf_ct_helper: allocate 16 bytes for the helper and policy names
This patch modifies the struct nf_conntrack_helper to allocate
the room for the helper name. The maximum length is 16 bytes
(this was already introduced in 2.6.24).
For the maximum length for expectation policy names, I have
also selected 16 bytes.
This patch is required by the follow-up patch to support
user-space connection tracking helpers.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_conntrack_sip.c')
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 93faf6a3a637..dfd3ff382243 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -1556,7 +1556,6 @@ static void nf_conntrack_sip_fini(void) static int __init nf_conntrack_sip_init(void) { int i, j, ret; - char *tmpname; if (ports_c == 0) ports[ports_c++] = SIP_PORT; @@ -1584,12 +1583,10 @@ static int __init nf_conntrack_sip_init(void) sip[i][j].expect_class_max = SIP_EXPECT_MAX; sip[i][j].me = THIS_MODULE; - tmpname = &sip_names[i][j][0]; if (ports[i] == SIP_PORT) - sprintf(tmpname, "sip"); + sprintf(sip_names[i][j], "sip"); else - sprintf(tmpname, "sip-%u", i); - sip[i][j].name = tmpname; + sprintf(sip_names[i][j], "sip-%u", i); pr_debug("port #%u: %u\n", i, ports[i]); |