Alex,

I think that the non-support for the mask has been deliberate, as the mask 
operates on bits, and the frag_type attribute is defined as an enum (which 
actually maps to individual bits so far). Maybe the problem is on the whoever 
produces the string to parse?

  Jarno

> On Apr 30, 2015, at 9:31 AM, Alex Wang <[email protected]> wrote:
> 
> ofproto/trace fails to parse the 'frag' in the ipv4 field due to a
> bug in odp-util.c.  This commit fixes the bug.
> 
> Reported-by: Jacob Cherkas <[email protected]>
> Signed-off-by: Alex Wang <[email protected]>
> ---
> lib/odp-util.c |    6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/odp-util.c b/lib/odp-util.c
> index b82edb7..2a71bb2 100644
> --- a/lib/odp-util.c
> +++ b/lib/odp-util.c
> @@ -2425,7 +2425,11 @@ scan_frag(const char *s, uint8_t *key, uint8_t *mask)
> 
>         *key = frag_type;
>         if (mask) {
> -            *mask = UINT8_MAX;
> +            if (ovs_scan(s + len, "/%"SCNi8"%n", mask, &n)) {
> +                len += n;
> +            } else {
> +                *mask = UINT8_MAX;
> +            }
>         }
>         return len;
>     }
> -- 
> 1.7.9.5
> 
> _______________________________________________
> dev mailing list
> [email protected]
> http://openvswitch.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to