ofp-util: Make ofputil_encode_set_protocol() able to return failure.
[sliver-openvswitch.git] / utilities / ovs-ofctl.c
index 914be98..08c3aa9 100644 (file)
@@ -763,7 +763,7 @@ try_set_protocol(struct vconn *vconn, enum ofputil_protocol want,
 
         request = ofputil_encode_set_protocol(*cur, want, &next);
         if (!request) {
-            return true;
+            return *cur == want;
         }
 
         run(vconn_transact_noreply(vconn, request, &reply),