From: Jorge Matias <jorge.matias@motorola.com>
Date: Tue, 27 Jun 2006 10:01:25 +0000 (-0700)
Subject: [NETFILTER]: xt_sctp: fix --chunk-types matching
X-Git-Tag: firefly_0821_release~34698^2~26
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1c7e47726a88303e4cfa2785f0a357bf1ceecee1;p=firefly-linux-kernel-4.4.55.git

[NETFILTER]: xt_sctp: fix --chunk-types matching

xt_sctp uses an incorrect header offset when --chunk-types is used.

Signed-off-by: Jorge Matias <jorge.matias@motorola.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
---

diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c
index 9316c753692f..843383e01d41 100644
--- a/net/netfilter/xt_sctp.c
+++ b/net/netfilter/xt_sctp.c
@@ -151,7 +151,7 @@ match(const struct sk_buff *skb,
 		&& SCCHECK(((ntohs(sh->dest) >= info->dpts[0]) 
 			&& (ntohs(sh->dest) <= info->dpts[1])), 
 			XT_SCTP_DEST_PORTS, info->flags, info->invflags)
-		&& SCCHECK(match_packet(skb, protoff,
+		&& SCCHECK(match_packet(skb, protoff + sizeof (sctp_sctphdr_t),
 					info->chunkmap, info->chunk_match_type,
  					info->flag_info, info->flag_count, 
 					hotdrop),