From ebed22466879365eb96842f13b85593045abccea Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 11 Jan 2012 09:58:17 -0800 Subject: [PATCH] datapath: Fix multipart datapath dumps. The logic to split up the list of datapaths into multiple Netlink messages was simply wrong, causing the list to be terminated after the first part. Only about the first 50 datapaths would be dumped. This fixes the problem. Bug #9124. Reported-by: Paul Ingram Signed-off-by: Ben Pfaff Acked-by: Jesse Gross --- datapath/datapath.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 4d95e04db..0e81a7a8a 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007-2011 Nicira Networks. + * Copyright (c) 2007-2012 Nicira Networks. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -1545,9 +1545,8 @@ static int ovs_dp_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb) int i = 0; list_for_each_entry(dp, &dps, list_node) { - if (i < skip) - continue; - if (ovs_dp_cmd_fill_info(dp, skb, NETLINK_CB(cb->skb).pid, + if (i >= skip && + ovs_dp_cmd_fill_info(dp, skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, OVS_DP_CMD_NEW) < 0) break; -- 2.43.0