All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf] netfilter: xt_LOG: fix mark logging for IPv6 packets
@ 2013-05-29  8:37 Michal Kubecek
  2013-05-29 11:18 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Kubecek @ 2013-05-29  8:37 UTC (permalink / raw)
  To: netfilter-devel
  Cc: Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik, netdev, coreteam

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>
---
 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.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH nf] netfilter: xt_LOG: fix mark logging for IPv6 packets
  2013-05-29  8:37 [PATCH nf] netfilter: xt_LOG: fix mark logging for IPv6 packets Michal Kubecek
@ 2013-05-29 11:18 ` Pablo Neira Ayuso
  2013-05-29 11:57   ` Michal Kubecek
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2013-05-29 11:18 UTC (permalink / raw)
  To: Michal Kubecek
  Cc: netfilter-devel, Patrick McHardy, Jozsef Kadlecsik, netdev, coreteam

On Wed, May 29, 2013 at 10:37:03AM +0200, Michal Kubecek wrote:
> 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.

Applied, thanks Michal.

The problem seems to be there since the beginning, ie. 2.6.26.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH nf] netfilter: xt_LOG: fix mark logging for IPv6 packets
  2013-05-29 11:18 ` Pablo Neira Ayuso
@ 2013-05-29 11:57   ` Michal Kubecek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Kubecek @ 2013-05-29 11:57 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: netfilter-devel, Patrick McHardy, Jozsef Kadlecsik, netdev, coreteam

On Wed, May 29, 2013 at 01:18:22PM +0200, Pablo Neira Ayuso wrote:
> On Wed, May 29, 2013 at 10:37:03AM +0200, Michal Kubecek wrote:
> > 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.
> 
> Applied, thanks Michal.
> 
> The problem seems to be there since the beginning, ie. 2.6.26.

Yes, as far as I can say, the IPv6 part actually never worked.

                                               Michal Kubeček

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-29 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-29  8:37 [PATCH nf] netfilter: xt_LOG: fix mark logging for IPv6 packets Michal Kubecek
2013-05-29 11:18 ` Pablo Neira Ayuso
2013-05-29 11:57   ` Michal Kubecek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.