From ac4285f4d4fb4067b06d69fcc7ca35d28d4977a9 Mon Sep 17 00:00:00 2001 From: Ashish Varma Date: Fri, 20 Apr 2018 15:28:38 -0700 Subject: 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 ".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 Signed-off-by: Ben Pfaff --- utilities/ovs-ofctl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'utilities/ovs-ofctl.c') 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); } -- cgit v1.2.1