From 1804d25a21dcdec83437ab1ebf9daf683d7e50da Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 9 Nov 2012 09:59:12 -0800 Subject: [PATCH] ofp-util: Make ofputil_encode_hello() return a message with correct length. This doesn't fix a visible bug, because code to send OpenFlow messages updates the length itself, but it still seems like the right thing to do. Signed-off-by: Ben Pfaff --- lib/ofp-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 14ac7c13..dea4aeaf 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -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; -- 2.30.2