summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorAles Musil <amusil@redhat.com>2023-03-13 08:16:34 +0100
committerIlya Maximets <i.maximets@ovn.org>2023-03-15 21:24:14 +0100
commitebe98c587deb1bc011d9ec6263dc25bed9df0d3b (patch)
tree3ca4721f508e291ec7098fbd89bec2d232cfa55c /utilities
parenta4cd2afea5c3ba08f38379a7356ffb3bf5662d5c (diff)
downloadopenvswitch-ebe98c587deb1bc011d9ec6263dc25bed9df0d3b.tar.gz
dpctl: Fix flush-conntrack with datapath as argument.
Specifying datapath with "dpctl/flush-conntrack" didn't work as expected and caused error: ovs-dpctl: field system@ovs-system missing value (Invalid argument) To prevent that, check if we have datapath as first argument and use it accordingly. Also add couple of test cases to ensure that everything works as expected. Fixes: a9ae73b916ba ("ofp, dpif: Allow CT flush based on partial match.") Signed-off-by: Ales Musil <amusil@redhat.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/ovs-ofctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index eabec18a3..3ce4e82ec 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -3089,6 +3089,10 @@ ofctl_ct_flush(struct ovs_cmdl_context *ctx)
args--;
}
+ if (args > 0) {
+ ovs_fatal(0, "Invalid arguments");
+ }
+
open_vconn(ctx->argv[1], &vconn);
enum ofp_version version = vconn_get_version(vconn);
struct ofpbuf *msg = ofp_ct_match_encode(&match, pzone, version);