Commit 991a6b735ff47710769545b11e481bb140b2e6f7

Authored by Pablo Neira Ayuso
1 parent 5343a7f8be

netfilter: nfnetlink_acct: fix incomplete dumping of objects

Fix broken incomplete object dumping if the list of objects does not
fit into one single netlink message.

Reported-by: Gabriel Lazar <Gabriel.Lazar@com.utcluj.ro>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff

net/netfilter/nfnetlink_acct.c
... ... @@ -149,9 +149,12 @@
149 149  
150 150 rcu_read_lock();
151 151 list_for_each_entry_rcu(cur, &nfnl_acct_list, head) {
152   - if (last && cur != last)
153   - continue;
  152 + if (last) {
  153 + if (cur != last)
  154 + continue;
154 155  
  156 + last = NULL;
  157 + }
155 158 if (nfnl_acct_fill_info(skb, NETLINK_CB(cb->skb).portid,
156 159 cb->nlh->nlmsg_seq,
157 160 NFNL_MSG_TYPE(cb->nlh->nlmsg_type),