Fix connection tracker helper

If the sip or tftp connection tracker is loaded with the parameter "ports",
the match will include the port number. What it does include however, is not
the port number, but the index into the list of ports. This patch will make
the code behave according to documentation (And as the older ftp conntrack
code does it right, the documentation is probably right as well and this
fixes a real BUG)

The reason for the second part of the patch (replacement of strncmp
by strcmp) is unclear. Christian: please explain!)
Index: linux-2.6.28/net/netfilter/nf_conntrack_sip.c
===================================================================
--- linux-2.6.28.orig/net/netfilter/nf_conntrack_sip.c	2009-03-23 12:29:31.000000000 +0100
+++ linux-2.6.28/net/netfilter/nf_conntrack_sip.c	2009-03-23 12:39:49.000000000 +0100
@@ -1355,7 +1355,7 @@ static int __init nf_conntrack_sip_init(
 			if (ports[i] == SIP_PORT)
 				sprintf(tmpname, "sip");
 			else
-				sprintf(tmpname, "sip-%u", i);
+				sprintf(tmpname, "sip-%u", ports[i]);
 			sip[i][j].name = tmpname;
 
 			pr_debug("port #%u: %u\n", i, ports[i]);
Index: linux-2.6.28/net/netfilter/nf_conntrack_tftp.c
===================================================================
--- linux-2.6.28.orig/net/netfilter/nf_conntrack_tftp.c	2009-03-23 12:29:37.000000000 +0100
+++ linux-2.6.28/net/netfilter/nf_conntrack_tftp.c	2009-03-23 12:41:49.000000000 +0100
@@ -132,7 +132,7 @@ static int __init nf_conntrack_tftp_init
 			if (ports[i] == TFTP_PORT)
 				sprintf(tmpname, "tftp");
 			else
-				sprintf(tmpname, "tftp-%u", i);
+				sprintf(tmpname, "tftp-%u", ports[i]);
 			tftp[i][j].name = tmpname;
 
 			ret = nf_conntrack_helper_register(&tftp[i][j]);
Index: linux-2.6.28/net/netfilter/xt_helper.c
===================================================================
--- linux-2.6.28.orig/net/netfilter/xt_helper.c	2009-03-23 12:29:43.000000000 +0100
+++ linux-2.6.28/net/netfilter/xt_helper.c	2009-03-23 12:31:39.000000000 +0100
@@ -49,8 +49,7 @@ helper_mt(const struct sk_buff *skb, con
 	if (info->name[0] == '\0')
 		ret = !ret;
 	else
-		ret ^= !strncmp(helper->name, info->name,
-				strlen(helper->name));
+		ret ^= !strcmp(helper->name, info->name);
 	return ret;
 }
 

