Skip to content

Commit

Permalink
netfilter: nfnetlink_acct: fix incomplete dumping of objects
Browse files Browse the repository at this point in the history
Fix broken incomplete object dumping if the list of objects does not
fit into one single netlink message.

Reported-by: Gabriel Lazar <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
ummakynes committed Jun 5, 2013
1 parent 5343a7f commit 991a6b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions net/netfilter/nfnetlink_acct.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,12 @@ nfnl_acct_dump(struct sk_buff *skb, struct netlink_callback *cb)

rcu_read_lock();
list_for_each_entry_rcu(cur, &nfnl_acct_list, head) {
if (last && cur != last)
continue;
if (last) {
if (cur != last)
continue;

last = NULL;
}
if (nfnl_acct_fill_info(skb, NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq,
NFNL_MSG_TYPE(cb->nlh->nlmsg_type),
Expand Down

0 comments on commit 991a6b7

Please sign in to comment.