[ovs-dev] [PATCH 3/4] ovs-dpctl: Parse the arguments correctly for del-flow.

Gurucharan Shetty shettyg at nicira.com
Mon Sep 23 21:19:49 UTC 2013


Inside dpctl_del_flow() argv[0] is 'del-flow' and argv[1] can
be the flow in the absence of the optional datapath argument.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 utilities/ovs-dpctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c
index 6e214ab..7118848 100644
--- a/utilities/ovs-dpctl.c
+++ b/utilities/ovs-dpctl.c
@@ -855,7 +855,7 @@ dpctl_del_flow(int argc, char *argv[])
     ofpbuf_init(&mask, 0);
     run(odp_flow_from_string(key_s, NULL, &key, &mask), "parsing flow key");
 
-    dp_name = argc == 2 ? xstrdup(argv[1]) : get_one_dp();
+    dp_name = argc == 3 ? xstrdup(argv[1]) : get_one_dp();
     run(parsed_dpif_open(dp_name, false, &dpif), "opening datapath");
     free(dp_name);
 
-- 
1.7.9.5




More information about the dev mailing list