From: Gurucharan Shetty Date: Mon, 23 Sep 2013 20:11:41 +0000 (-0700) Subject: ovs-dpctl: Parse the arguments correctly for del-flow. X-Git-Tag: sliver-openvswitch-2.0.90-1~13^2~10 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0d6c14937bd30e47865456bcafa30e163d88634f;p=sliver-openvswitch.git 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 --- 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);