Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90679
b: refs/heads/master
c: 36e2a1b
h: refs/heads/master
i:
  90677: 51ecb8d
  90675: 7362c31
  90671: e0ce531
v: v3
  • Loading branch information
Patrick McHardy committed Apr 14, 2008
1 parent a7692ef commit 0da137e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b916f7d4b7b4b427ad9a9486de3da41a16b24d67
refs/heads/master: 36e2a1b0f7f2598e38952494b91490f58aa221c8
6 changes: 5 additions & 1 deletion trunk/net/ipv4/netfilter/ipt_LOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,16 @@ static void dump_packet(const struct nf_loginfo *info,
if ((logflags & IPT_LOG_UID) && !iphoff && skb->sk) {
read_lock_bh(&skb->sk->sk_callback_lock);
if (skb->sk->sk_socket && skb->sk->sk_socket->file)
printk("UID=%u GID=%u",
printk("UID=%u GID=%u ",
skb->sk->sk_socket->file->f_uid,
skb->sk->sk_socket->file->f_gid);
read_unlock_bh(&skb->sk->sk_callback_lock);
}

/* Max length: 16 "MARK=0xFFFFFFFF " */
if (!iphoff && skb->mark)
printk("MARK=0x%x ", skb->mark);

/* Proto Max log string length */
/* IP: 40+46+6+11+127 = 230 */
/* TCP: 10+max(25,20+30+13+9+32+11+127) = 252 */
Expand Down
6 changes: 5 additions & 1 deletion trunk/net/ipv6/netfilter/ip6t_LOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,15 @@ static void dump_packet(const struct nf_loginfo *info,
if ((logflags & IP6T_LOG_UID) && recurse && skb->sk) {
read_lock_bh(&skb->sk->sk_callback_lock);
if (skb->sk->sk_socket && skb->sk->sk_socket->file)
printk("UID=%u GID=%u",
printk("UID=%u GID=%u ",
skb->sk->sk_socket->file->f_uid,
skb->sk->sk_socket->file->f_gid);
read_unlock_bh(&skb->sk->sk_callback_lock);
}

/* Max length: 16 "MARK=0xFFFFFFFF " */
if (!recurse && skb->mark)
printk("MARK=0x%x ", skb->mark);
}

static struct nf_loginfo default_loginfo = {
Expand Down

0 comments on commit 0da137e

Please sign in to comment.