Subject: [patch 46/48] netfilter: xt_sctp: sctp chunk mapping doesnt work

From: Greg KH <[email-masked]>
Date: Fri, 13 Feb 2009 17:13:53 -0800

2.6.28-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Qu Haoran <[email-masked]>

netfilter: xt_sctp: sctp chunk mapping doesn't work

Upstream commit: d4e2675a

When user tries to map all chunks given in argument, kernel
works on a copy of the chunkmap, but at the end it doesn't
check the copy, but the orginal one.

Signed-off-by: Qu Haoran <[email-masked]>
Signed-off-by: Nicolas Dichtel <[email-masked]>
Signed-off-by: Patrick McHardy <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>

---
 net/netfilter/xt_sctp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/netfilter/xt_sctp.c
+++ b/net/netfilter/xt_sctp.c
@@ -105,7 +105,7 @@ match_packet(const struct sk_buff *skb,
 
 	switch (chunk_match_type) {
 	case SCTP_CHUNK_MATCH_ALL:
-		return SCTP_CHUNKMAP_IS_CLEAR(info->chunkmap);
+		return SCTP_CHUNKMAP_IS_CLEAR(chunkmapcopy);
 	case SCTP_CHUNK_MATCH_ANY:
 		return false;
 	case SCTP_CHUNK_MATCH_ONLY: