From fca6d553da248dac1b03f7f3741c85b031cae6c4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 8 May 2014 21:20:22 -0700 Subject: 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 Conflicts: utilities/ovs-ofctl.c --- lib/ofp-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ofp-util.h') diff --git a/lib/ofp-util.h b/lib/ofp-util.h index 782e512a2..9c87cf6a9 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -569,7 +569,7 @@ struct ofpbuf *ofputil_encode_switch_features( ovs_be32 xid); void ofputil_put_switch_features_port(const struct ofputil_phy_port *, struct ofpbuf *); -bool ofputil_switch_features_ports_trunc(struct ofpbuf *b); +bool ofputil_switch_features_has_ports(struct ofpbuf *b); /* phy_port helper functions. */ int ofputil_pull_phy_port(enum ofp_version ofp_version, struct ofpbuf *, -- cgit v1.2.1