From: Ben Pfaff Date: Wed, 11 Jan 2012 17:58:17 +0000 (-0800) Subject: datapath: Fix multipart datapath dumps. X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=c0df900af95845f1d113873827ba8aab5cdd2e11 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 --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 668d2ff7a..d80a2dba1 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, 2009, 2010, 2011 Nicira Networks. + * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 Nicira Networks. * Distributed under the terms of the GNU GPL version 2. * * Significant portions of this file may be copied from parts of the Linux @@ -1578,9 +1578,8 @@ static int odp_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 (odp_dp_cmd_fill_info(dp, skb, NETLINK_CB(cb->skb).pid, + if (i >= skip && + odp_dp_cmd_fill_info(dp, skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, ODP_DP_CMD_NEW) < 0) break;