On 11/28/23 08:46, Ales Musil wrote: > CT flush extension would silently ignore unknown properties, > which could lead to potential surprise by deleting more than > it was requested to. Return error on unknown property instead > to avoid this problem and at the same time inform the user > that the specified property is not supported. > > Fixes: 08146bf7d9b4 ("openflow: Add extension to flush CT by generic match.") > Signed-off-by: Ales Musil <amu...@redhat.com> > --- > lib/ofp-ct.c | 7 +++++++ > tests/ofp-print.at | 9 +++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/lib/ofp-ct.c b/lib/ofp-ct.c > index 85a9d8bec..c4fabbe84 100644 > --- a/lib/ofp-ct.c > +++ b/lib/ofp-ct.c > @@ -31,6 +31,9 @@ > #include "openvswitch/ofp-prop.h" > #include "openvswitch/ofp-util.h" > #include "openvswitch/packets.h" > +#include "openvswitch/vlog.h" > + > +VLOG_DEFINE_THIS_MODULE(ofp_ct); > > static void > ofp_ct_tuple_format(struct ds *ds, const struct ofp_ct_tuple *tuple, > @@ -377,6 +380,10 @@ ofp_ct_match_decode(struct ofp_ct_match *match, bool > *with_zone, > } > error = ofpprop_parse_u16(&property, zone_id); > break; > + > + default: > + error = OFPPROP_UNKNOWN(false, "ofp_ct_match", type); > + break;
Hi, Ales. There is a similar check missing in ofp_ct_tuple_decode_nested(). Could you please add it as well? Best regards, Ilya Maximets. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev