summaryrefslogtreecommitdiff
path: root/utilities/ovs-ofctl.c
diff options
context:
space:
mode:
authorAshish Varma <ashishvarma.ovs@gmail.com>2018-04-20 15:28:38 -0700
committerBen Pfaff <blp@ovn.org>2018-04-25 12:46:24 -0700
commitac4285f4d4fb4067b06d69fcc7ca35d28d4977a9 (patch)
treeacdbc5a84a395b8f214647b8a294fabe8c2fa2f6 /utilities/ovs-ofctl.c
parent3a2ceb01c81b463eb69db04c4971d4373a835e42 (diff)
downloadopenvswitch-ac4285f4d4fb4067b06d69fcc7ca35d28d4977a9.tar.gz
ovs-ofctl: Fix "ovs-ofctl snoop".
In case where "use_names" is set (e.g. in an interactive session) to show the port and table names when ovs-ofctl is run with snoop command, ovs-ofctl would get stuck in an endless loop inside "table_iterator_next" function's while loop checking for "while (ti->send_xid != recv_xid)". This would happening because the "vconn" to "<bridge>.snoop" socket would not respond to TABLE_FEATURES_REQUEST sent by ovs-ofctl. This commit disables showing port or table names in the snoop command. Signed-off-by: Ashish Varma <ashishvarma.ovs@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'utilities/ovs-ofctl.c')
-rw-r--r--utilities/ovs-ofctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 6708b07a5..029a1c8b9 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -2326,6 +2326,11 @@ ofctl_snoop(struct ovs_cmdl_context *ctx)
{
struct vconn *vconn;
+ /* We can't use the snoop vconn to send table features request or port
+ * description request messages to show names, because ovs-vswitchd will
+ * not respond to these messages on snoop vconn. */
+ use_names = 0;
+
open_vconn__(ctx->argv[1], SNOOP, &vconn);
monitor_vconn(vconn, false, false);
}