From 379c2564b617aa4d36efba0956d92d0d363c6d86 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 13 Apr 2010 16:48:10 -0700 Subject: [PATCH] ovs-dpctl: In "dump-flows", only print flows that can be retrieved. If dpif_flow_get() returns an error then we'd better not try to print the flow (especially not the actions since check_rw_odp_flow() clears the first action to 0xcc). --- utilities/ovs-dpctl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index eb78a573b..ecfb3069a 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -473,11 +473,11 @@ do_dump_flows(int argc OVS_UNUSED, char *argv[]) f->actions = actions; f->n_actions = MAX_ACTIONS; - dpif_flow_get(dpif, f); - - ds_clear(&ds); - format_odp_flow(&ds, f); - printf("%s\n", ds_cstr(&ds)); + if (!dpif_flow_get(dpif, f)) { + ds_clear(&ds); + format_odp_flow(&ds, f); + printf("%s\n", ds_cstr(&ds)); + } } ds_destroy(&ds); dpif_close(dpif); -- 2.43.0