On Fri, Mar 31, 2017 at 04:46:22PM -0700, Han Zhou wrote:
> When uuid starts with 0s, lflow-list will fail if leading 0s are
> not included in command argument. This leads to unexpected results
> considering that leading 0s are usually not shown up in cookies
> of OpenFlow outputs of tools such as ovs-ofctl dump-flows
> and ovs-appctl ofproto/trace. E.g.
>
> lflow uuid: 0c16ceb4-0409-484b-8297-a6e7f264ac2d
> $ ovn-nbctl lflow-list 0c16ceb4 # works fine
> $ ovn-nbctl lflow-list c16ceb4 # doesn't work
>
> This patch fixes the problem.
>
> Signed-off-by: Han Zhou <[email protected]>
Wow, that's subtle. Good catch!
I applied this to master and branch-2.7. I couldn't resist changing
strip_leading_zero() to just
static const char *
strip_leading_zero(const char *s)
{
return s + strspn(s, "0");
}
though.
(By the way, this is going to result in "ovn-nbctl lflow-list 00000"
listing all the flows, but I guess that's not a big deal.)
Thanks,
Ben.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev