ofp-util: Fix offset when making Nicira extension error messages.
authorJustin Pettit <jpettit@nicira.com>
Wed, 8 Dec 2010 05:58:30 +0000 (21:58 -0800)
committerJustin Pettit <jpettit@nicira.com>
Wed, 8 Dec 2010 05:58:30 +0000 (21:58 -0800)
lib/ofp-util.c

index 2c525baf0d2a209a67853ffae3d247f3aa69dab5..f37b644b672015d086420361b811169c61b95f67 100644 (file)
@@ -1988,7 +1988,7 @@ make_ofp_error_msg(int error, const struct ofp_header *oh)
         oem->type = htons(NXET_VENDOR);
         oem->code = htons(NXVC_VENDOR_ERROR);
 
-        nve = ofpbuf_put_uninit(buf, sizeof *nve);
+        nve = (struct nx_vendor_error *)oem->data;
         nve->vendor = htonl(vendor_id);
         nve->type = htons(type);
         nve->code = htons(code);