netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 4/5] netfilter: xt_LOG: fix mark logging for IPv6 packets
Date: Wed, 29 May 2013 18:03:12 +0200	[thread overview]
Message-ID: <1369843394-24251-5-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1369843394-24251-1-git-send-email-pablo@netfilter.org>

From: Michal Kubeček <mkubecek@suse.cz>

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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/xt_LOG.c b/net/netfilter/xt_LOG.c
index 491c7d8..5ab2484 100644
--- a/net/netfilter/xt_LOG.c
+++ b/net/netfilter/xt_LOG.c
@@ -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);
 }
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-05-29 16:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 16:03 [PATCH 0/5] netfilter fixes for 3.10-rc3 Pablo Neira Ayuso
2013-05-29 16:03 ` [PATCH 1/5] netfilter: add nf_ipv6_ops hook to fix xt_addrtype with IPv6 Pablo Neira Ayuso
2013-05-31  0:24   ` Lorenzo Colitti
2013-06-02 22:06     ` Florian Westphal
2013-05-29 16:03 ` [PATCH 2/5] netfilter: ipt_ULOG: fix non-null terminated string in the nf_log path Pablo Neira Ayuso
2013-05-29 16:03 ` [PATCH 3/5] ipvs: Fix reuse connection if real server is dead Pablo Neira Ayuso
2013-05-29 16:03 ` Pablo Neira Ayuso [this message]
2013-05-29 16:03 ` [PATCH 5/5] ipvs: ip_vs_sh: fix build Pablo Neira Ayuso
2013-05-30 23:39 ` [PATCH 0/5] netfilter fixes for 3.10-rc3 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369843394-24251-5-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).