ofp-util: Make ofputil_encode_hello() return a message with correct length.
[openvswitch] / lib / ofp-util.c
index 14ac7c13d1ad5076afaf911c611459b6895f2935..dea4aeafce0ce006e6ec56b69fb9ecba3fd4eee6 100644 (file)
@@ -1188,6 +1188,8 @@ ofputil_encode_hello(uint32_t allowed_versions)
         oheh->type = htons(OFPHET_VERSIONBITMAP);
         oheh->length = htons(map_len + sizeof *oheh);
         *(ovs_be32 *)(oheh + 1) = htonl(allowed_versions);
+
+        ofpmsg_update_length(msg);
     }
 
     return msg;