ovs-ofctl: Fix del-flows command parsing bugs.
authorBen Pfaff <blp@nicira.com>
Tue, 7 Dec 2010 22:30:07 +0000 (14:30 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 9 Dec 2010 18:27:08 +0000 (10:27 -0800)
commit640c7c945f3c748240609dc572858fc188db1c06
tree5af5c5344db57bc7fde66dc8ea034d8d7495e25d
parent09862ec6099a95f525c013a0446ab5bc25ece280
ovs-ofctl: Fix del-flows command parsing bugs.

"ovs-ofctl del-flows br0" segfaulted because do_flow_mod__() assumed that
it always had a "flow" argument, which is not true for the del-flows
command.

Beyond that, parse_ofp_flow_mod_str() rejected "ovs-ofctl del-flows
br0" because no actions were supplied, even though supplying actions
doesn't make sense for deleting flows.

This commit fixes both problems and adds a simple test that would have
caught both problems.

Bug #4112.
lib/ofp-parse.c
tests/ofproto.at
utilities/ovs-ofctl.c