ovs-ofctl: Fix port lookup and "ovs-ofctl" behavior for OpenFlow 1.3+.
authorBen Pfaff <blp@nicira.com>
Fri, 9 May 2014 04:20:22 +0000 (21:20 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 14 May 2014 17:31:41 +0000 (10:31 -0700)
commitfca6d553da248dac1b03f7f3741c85b031cae6c4
tree3ddc0f24be60eb65a31479d1dc92561a01e27979
parent226cb5bf14e5df6c5b427715b605635890907cd0
ovs-ofctl: Fix port lookup and "ovs-ofctl" behavior for OpenFlow 1.3+.

ovs-ofctl supports using port names in commands that operate on ports.  It
does this by connecting to the switch, listing the ports, and picking out
the one with the specified name.  However, this didn't work properly for
OpenFlow 1.3+, because it always used an OFPT_FEATURES_REQUEST to list the
ports, and in OpenFlow 1.3+ the reply to this request does not include a
list of ports.  This commit fixes the problem (using code that previously
was just a fallback when there were too many ports to fit in an
OFPT_FEATURES_REPLY).

For similar reasons, "ovs-ofctl show" wasn't listing the switch's ports
when it connected to a switch over OpenFlow 1.3 or later.  This commit
fixes that bug also.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Conflicts:
utilities/ovs-ofctl.c
lib/ofp-util.c
lib/ofp-util.h
utilities/ovs-ofctl.c