]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
netfilter: xt_LOG: fix mark logging for IPv6 packets
authorMichal Kubeček <mkubecek@suse.cz>
Tue, 28 May 2013 22:37:03 +0000 (22:37 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 29 May 2013 10:29:18 +0000 (12:29 +0200)
In dump_ipv6_packet(), the "recurse" parameter is zero only if
dumping contents of a packet embedded into an ICMPv6 error
message. Therefore we want to log packet mark if recurse is
non-zero, not when it is zero.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_LOG.c

index 491c7d821a0bd1f984159249312ae8f40345fd3a..5ab24843370a0b452e8647b4b0a99d54c96d6087 100644 (file)
@@ -737,7 +737,7 @@ static void dump_ipv6_packet(struct sbuff *m,
                dump_sk_uid_gid(m, skb->sk);
 
        /* Max length: 16 "MARK=0xFFFFFFFF " */
-       if (!recurse && skb->mark)
+       if (recurse && skb->mark)
                sb_add(m, "MARK=0x%x ", skb->mark);
 }