vconn: Replace minimum version with bitmap of allowed versions.
[openvswitch] / utilities / ovs-ofctl.c
index a0b70793b93413a247491aa3ffde5c1de308d75a..900c3d8d4db782d262377167a9c6fe56607b73a0 100644 (file)
@@ -336,7 +336,7 @@ open_vconn_socket(const char *name, struct vconn **vconnp)
 {
     char *vconn_name = xasprintf("unix:%s", name);
     VLOG_DBG("connecting to %s", vconn_name);
-    run(vconn_open_block(vconn_name, OFP10_VERSION, vconnp),
+    run(vconn_open_block(vconn_name, 0, vconnp),
         "connecting to %s", vconn_name);
     free(vconn_name);
 }
@@ -360,8 +360,7 @@ open_vconn__(const char *name, const char *default_suffix,
     free(datapath_type);
 
     if (strchr(name, ':')) {
-        run(vconn_open_block(name, OFP10_VERSION, vconnp),
-            "connecting to %s", name);
+        run(vconn_open_block(name, 0, vconnp), "connecting to %s", name);
     } else if (!stat(name, &s) && S_ISSOCK(s.st_mode)) {
         open_vconn_socket(name, vconnp);
     } else if (!stat(bridge_path, &s) && S_ISSOCK(s.st_mode)) {
@@ -741,8 +740,9 @@ fetch_ofputil_phy_port(const char *vconn_name, const char *port_name,
 static uint16_t
 str_to_port_no(const char *vconn_name, const char *port_name)
 {
-    uint16_t port_no = ofputil_port_from_string(port_name);
-    if (port_no) {
+    uint16_t port_no;
+
+    if (ofputil_port_from_string(port_name, &port_no)) {
         return port_no;
     } else {
         struct ofputil_phy_port pp;