Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300387
b: refs/heads/master
c: 7c80118
h: refs/heads/master
i:
  300385: 1561453
  300383: 7f5960b
v: v3
  • Loading branch information
David S. Miller committed Apr 1, 2012
1 parent 06c7898 commit 612df31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 48f03bdad8b3b0f5a96db45d517149eccd7f4ca8
refs/heads/master: 7c8011895330d3069b137233e2673f40ee6f4c91
10 changes: 6 additions & 4 deletions trunk/net/netfilter/nfnetlink_acct.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ nfnl_acct_fill_info(struct sk_buff *skb, u32 pid, u32 seq, u32 type,
nfmsg->version = NFNETLINK_V0;
nfmsg->res_id = 0;

NLA_PUT_STRING(skb, NFACCT_NAME, acct->name);
if (nla_put_string(skb, NFACCT_NAME, acct->name))
goto nla_put_failure;

if (type == NFNL_MSG_ACCT_GET_CTRZERO) {
pkts = atomic64_xchg(&acct->pkts, 0);
Expand All @@ -118,9 +119,10 @@ nfnl_acct_fill_info(struct sk_buff *skb, u32 pid, u32 seq, u32 type,
pkts = atomic64_read(&acct->pkts);
bytes = atomic64_read(&acct->bytes);
}
NLA_PUT_BE64(skb, NFACCT_PKTS, cpu_to_be64(pkts));
NLA_PUT_BE64(skb, NFACCT_BYTES, cpu_to_be64(bytes));
NLA_PUT_BE32(skb, NFACCT_USE, htonl(atomic_read(&acct->refcnt)));
if (nla_put_be64(skb, NFACCT_PKTS, cpu_to_be64(pkts)) ||
nla_put_be64(skb, NFACCT_BYTES, cpu_to_be64(bytes)) ||
nla_put_be32(skb, NFACCT_USE, htonl(atomic_read(&acct->refcnt))))
goto nla_put_failure;

nlmsg_end(skb, nlh);
return skb->len;
Expand Down

0 comments on commit 612df31

Please sign in to comment.