diff options
author | Patrick McHardy <kaber@trash.net> | 2008-03-20 10:15:45 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-04-14 03:56:01 -0400 |
commit | 36e2a1b0f7f2598e38952494b91490f58aa221c8 (patch) | |
tree | fb183ec56b7d137ff1aaa4eccd1be307e2d70eac /net/ipv6 | |
parent | b916f7d4b7b4b427ad9a9486de3da41a16b24d67 (diff) |
[NETFILTER]: {ip,ip6}t_LOG: print MARK value in log output
Dump the mark value in log messages similar to nfnetlink_log. This
is useful for debugging complex setups where marks are used for
routing or traffic classification.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6t_LOG.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index 86a613810b69..3a2316974f83 100644 --- a/net/ipv6/netfilter/ip6t_LOG.c +++ b/net/ipv6/netfilter/ip6t_LOG.c | |||
@@ -363,11 +363,15 @@ static void dump_packet(const struct nf_loginfo *info, | |||
363 | if ((logflags & IP6T_LOG_UID) && recurse && skb->sk) { | 363 | if ((logflags & IP6T_LOG_UID) && recurse && skb->sk) { |
364 | read_lock_bh(&skb->sk->sk_callback_lock); | 364 | read_lock_bh(&skb->sk->sk_callback_lock); |
365 | if (skb->sk->sk_socket && skb->sk->sk_socket->file) | 365 | if (skb->sk->sk_socket && skb->sk->sk_socket->file) |
366 | printk("UID=%u GID=%u", | 366 | printk("UID=%u GID=%u ", |
367 | skb->sk->sk_socket->file->f_uid, | 367 | skb->sk->sk_socket->file->f_uid, |
368 | skb->sk->sk_socket->file->f_gid); | 368 | skb->sk->sk_socket->file->f_gid); |
369 | read_unlock_bh(&skb->sk->sk_callback_lock); | 369 | read_unlock_bh(&skb->sk->sk_callback_lock); |
370 | } | 370 | } |
371 | |||
372 | /* Max length: 16 "MARK=0xFFFFFFFF " */ | ||
373 | if (!recurse && skb->mark) | ||
374 | printk("MARK=0x%x ", skb->mark); | ||
371 | } | 375 | } |
372 | 376 | ||
373 | static struct nf_loginfo default_loginfo = { | 377 | static struct nf_loginfo default_loginfo = { |