From 0d6c14937bd30e47865456bcafa30e163d88634f Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Mon, 23 Sep 2013 13:11:41 -0700 Subject: [PATCH] ovs-dpctl: Parse the arguments correctly for del-flow. 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 Acked-by: Ben Pfaff --- 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 be94f0b57..43c0db645 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); -- 2.43.0