netfilter: xt_sctp: sctp chunk mapping doesn't work
authorQu Haoran <haoran.qu@6wind.com>
Mon, 9 Feb 2009 22:34:56 +0000 (14:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Feb 2009 22:34:56 +0000 (14:34 -0800)
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 <haoran.qu@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/xt_sctp.c

index e223cb4..a189ada 100644 (file)
@@ -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: