aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-01-17 08:33:39 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-17 23:56:19 -0500
commit77676fdbd54f0c6fdb71d55d9758bebc69a00fc4 (patch)
tree388bd73334ae4716b8d82879166a1c2a5639f0f0 /net/openvswitch
parent766e9f1be128bcdc15aa7d07084d0d51e873b5ed (diff)
openvswitch: 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. Reported-by: Paul Ingram <paul@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/datapath.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index d9d01cbf0fcb..ce64c18b8c79 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2007-2011 Nicira Networks. 2 * Copyright (c) 2007-2012 Nicira Networks.
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public 5 * modify it under the terms of version 2 of the GNU General Public
@@ -1396,9 +1396,8 @@ static int ovs_dp_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb)
1396 int i = 0; 1396 int i = 0;
1397 1397
1398 list_for_each_entry(dp, &dps, list_node) { 1398 list_for_each_entry(dp, &dps, list_node) {
1399 if (i < skip) 1399 if (i >= skip &&
1400 continue; 1400 ovs_dp_cmd_fill_info(dp, skb, NETLINK_CB(cb->skb).pid,
1401 if (ovs_dp_cmd_fill_info(dp, skb, NETLINK_CB(cb->skb).pid,
1402 cb->nlh->nlmsg_seq, NLM_F_MULTI, 1401 cb->nlh->nlmsg_seq, NLM_F_MULTI,
1403 OVS_DP_CMD_NEW) < 0) 1402 OVS_DP_CMD_NEW) < 0)
1404 break; 1403 break;