ofp-util: Fix xid in ofputil_encode_bundle_add().
authorJarno Rajahalme <jrajahalme@nicira.com>
Fri, 29 May 2015 18:28:38 +0000 (11:28 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Mon, 1 Jun 2015 20:24:09 +0000 (13:24 -0700)
Bundle add must use the same xid as the embedded message.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/ofp-util.c

index 6366919..e62c584 100644 (file)
@@ -8900,7 +8900,9 @@ ofputil_encode_bundle_add(enum ofp_version ofp_version,
     struct ofpbuf *request;
     struct ofp14_bundle_ctrl_msg *m;
 
-    request = ofpraw_alloc(OFPRAW_OFPT14_BUNDLE_ADD_MESSAGE, ofp_version, 0);
+    /* Must use the same xid as the embedded message. */
+    request = ofpraw_alloc_xid(OFPRAW_OFPT14_BUNDLE_ADD_MESSAGE, ofp_version,
+                               msg->msg->xid, 0);
     m = ofpbuf_put_zeros(request, sizeof *m);
 
     m->bundle_id = htonl(msg->bundle_id);