Commit e9324b2ce656e1910d2385b9b47a2f926456dbe3

Authored by Patrick McHardy
Committed by Pablo Neira Ayuso
1 parent a2d6a1d5a4

netfilter: nf_ct_sip: fix helper name

Commit 3a8fc53a (netfilter: nf_ct_helper: allocate 16 bytes for the helper
and policy names) introduced a bug in the SIP helper, the helper name is
sprinted to the sip_names array instead of instead of into the helper
structure. This breaks the helper match and the /proc/net/nf_conntrack_expect
output.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff

net/netfilter/nf_conntrack_sip.c
... ... @@ -1515,7 +1515,6 @@
1515 1515 }
1516 1516  
1517 1517 static struct nf_conntrack_helper sip[MAX_PORTS][4] __read_mostly;
1518   -static char sip_names[MAX_PORTS][4][sizeof("sip-65535")] __read_mostly;
1519 1518  
1520 1519 static const struct nf_conntrack_expect_policy sip_exp_policy[SIP_EXPECT_MAX + 1] = {
1521 1520 [SIP_EXPECT_SIGNALLING] = {
1522 1521  
... ... @@ -1585,9 +1584,9 @@
1585 1584 sip[i][j].me = THIS_MODULE;
1586 1585  
1587 1586 if (ports[i] == SIP_PORT)
1588   - sprintf(sip_names[i][j], "sip");
  1587 + sprintf(sip[i][j].name, "sip");
1589 1588 else
1590   - sprintf(sip_names[i][j], "sip-%u", i);
  1589 + sprintf(sip[i][j].name, "sip-%u", i);
1591 1590  
1592 1591 pr_debug("port #%u: %u\n", i, ports[i]);
1593 1592