Skip to content

Commit

Permalink
netfilter: nfnetlink_cttimeout: 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 <Gabriel.Lazar@com.utcluj.ro>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Pablo Neira Ayuso committed Jun 5, 2013
1 parent 991a6b7 commit 37bc4f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions net/netfilter/nfnetlink_cttimeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,12 @@ ctnl_timeout_dump(struct sk_buff *skb, struct netlink_callback *cb)

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

last = NULL;
}
if (ctnl_timeout_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 37bc4f8

Please sign in to comment.