Patchwork [43/98] netfilter: xt_LOG: fix mark logging for IPv6 packets

login
register
mail settings
Submitter Luis Henriques
Date July 11, 2013, 2:24 p.m.
Message ID <1373552708-15235-44-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/258556/
State New
Headers show

Comments

Luis Henriques - July 11, 2013, 2:24 p.m.
3.5.7.17 -stable review patch.  If anyone has any objections, please let me know.

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

From: =?UTF-8?q?Michal=20Kube=C4=8Dek?= <mkubecek@suse.cz>

commit d660164d79b67f879db35a7d61e47d3b99bc714e upstream.

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>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 net/netfilter/xt_LOG.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/net/netfilter/xt_LOG.c b/net/netfilter/xt_LOG.c
index ff5f75f..a2e878f 100644
--- a/net/netfilter/xt_LOG.c
+++ b/net/netfilter/xt_LOG.c
@@ -727,7 +727,7 @@  static void dump_ipv6_packet(struct sbuff *m,
 	}
 
 	/* Max length: 16 "MARK=0xFFFFFFFF " */
-	if (!recurse && skb->mark)
+	if (recurse && skb->mark)
 		sb_add(m, "MARK=0x%x ", skb->mark);
 }