On Tue, Aug 01, 2017 at 08:26:07AM -0700, Ben Pfaff wrote:
> On Tue, Aug 01, 2017 at 12:32:20PM +0000, Yang, Yi Y wrote:
> > #2.
> > [Ben] I suspect that decode_NXAST_RAW_DECAP() should report an error if 
> > properties are present, since it doesn't support properties.
> > 
> > [Yi] It is impossible. 
> 
> What is impossible?  It is easy to detect that properties are present
> and report an error:
> 
> diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
> index d0437f20922a..7be302a4005d 100644
> --- a/lib/ofp-actions.c
> +++ b/lib/ofp-actions.c
> @@ -4263,6 +4263,11 @@ decode_NXAST_RAW_DECAP(const struct nx_action_decap 
> *nad,
>                         enum ofp_version ofp_version OVS_UNUSED,
>                         struct ofpbuf *ofpacts)
>  {
> +    if (ntohs(nad->len) > sizeof *nad) {
> +        /* No properties supported yet. */
> +        return OFPERR_OFPBPC_BAD_TYPE;
> +    }

Looking again, I guess that OFPERR_NXBAC_UNKNOWN_ED_PROP is better.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to