netfilter: nfnetlink_cttimeout: fix incomplete dumping of objects
authorPablo Neira Ayuso <pablo@netfilter.org>
Sat, 1 Jun 2013 13:36:02 +0000 (15:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 5 Jun 2013 10:36:37 +0000 (12:36 +0200)
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>
net/netfilter/nfnetlink_cttimeout.c

index 701c88a20fea4c2a3ca6c9b4b2189521e13f96fe..65074dfb9383a40faef6c27346399e7dc6711889 100644 (file)
@@ -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),