ofp-util: Make ofputil_encode_set_protocol() able to return failure.
[openvswitch] / utilities / ovs-ofctl.c
index 914be9840870535b4321d23f35f4d6cd946f3087..08c3aa9272f5f022a70826e3d47497586731733b 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),