ofp-parse: Fix padding parsing write-actions.
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Thu, 17 Oct 2013 15:51:23 +0000 (08:51 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 17 Oct 2013 15:53:51 +0000 (08:53 -0700)
For longer term, "nested" variants of some ofpact functions
which using ofpbuf->l3 might be desirable.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-parse.c

index f55eb3f..2350de3 100644 (file)
@@ -951,8 +951,10 @@ parse_named_instruction(enum ovs_instruction_type type,
 
     case OVSINST_OFPIT11_WRITE_ACTIONS: {
         struct ofpact_nest *on;
-        size_t ofs = ofpacts->size;
+        size_t ofs;
 
+        ofpact_pad(ofpacts);
+        ofs = ofpacts->size;
         on = ofpact_put(ofpacts, OFPACT_WRITE_ACTIONS,
                         offsetof(struct ofpact_nest, actions));
         error_s = str_to_ofpacts__(arg, ofpacts, usable_protocols);