[3.8.y.z,extended,stable] Patch "netfilter: nfnetlink_acct: fix incomplete dumping of objects" has been added to staging queue

Submitted by Luis Henriques on July 9, 2013, 4:29 p.m.


Message ID 1373387375-23380-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques July 9, 2013, 4:29 p.m.
This is a note to let you know that I have just added a patch titled

    netfilter: nfnetlink_acct: fix incomplete dumping of objects

to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.8.y.z tree, see



From 06c7da8ce4f532391d3bb80f9b538aef7de1b0d7 Mon Sep 17 00:00:00 2001
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Sat, 1 Jun 2013 15:31:40 +0200
Subject: [PATCH] netfilter: nfnetlink_acct: fix incomplete dumping of objects

commit 991a6b735ff47710769545b11e481bb140b2e6f7 upstream.

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>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
 net/netfilter/nfnetlink_acct.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


Patch hide | download patch | download mbox

diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c
index 589d686..125bd35 100644
--- a/net/netfilter/nfnetlink_acct.c
+++ b/net/netfilter/nfnetlink_acct.c
@@ -147,9 +147,12 @@  nfnl_acct_dump(struct sk_buff *skb, struct netlink_callback *cb)

 	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,