ovs-ofctl: Avoid printing false differences on "ovs-ofctl diff-flows".
authorBen Pfaff <blp@nicira.com>
Mon, 23 Jul 2012 17:16:31 +0000 (10:16 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 23 Jul 2012 17:16:31 +0000 (10:16 -0700)
commit98f7f427bf8bb339d4d1f1df1ff9b3310f8f5bc4
treec32a192c38d2e75f436dbe28e41075b3840b2225
parent4b9f923273fb79079fcfa15350299b71a0062969
ovs-ofctl: Avoid printing false differences on "ovs-ofctl diff-flows".

It is possible for "struct ofpact"s to differ bytewise even if they are
equivalent when converted to another representation, such as OpenFlow 1.0
action format or a string representation.  This can cause "ovs-ofctl
diff-flows" to print surprising false "differences", e.g. as in the bug
report:

    - actions=resubmit(,1)
    + actions=resubmit(,1)

This commit fixes the problem by comparing not just the ofpacts but also
the string representation and printing a difference only if both differ.

Bug #8899.
Reported-by: Luca Giraudo <lgiraudo@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/ovs-ofctl.at
utilities/ovs-ofctl.c