ofp-util: Fix struct ofputil_requestforward union membership.
authorBen Pfaff <blp@nicira.com>
Thu, 10 Sep 2015 17:00:41 +0000 (10:00 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 18 Sep 2015 18:31:20 +0000 (11:31 -0700)
'bands' should be paired with 'meter_mod' because 'bands' may hold the
storage for the meter's bands.  ('bands' has nothing to do with
'group_mod'.)

Reported-by: niti Rohilla <niti1489@gmail.com>
Reported-at: http://openvswitch.org/pipermail/dev/2015-September/059847.html
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
lib/ofp-util.h

index cbd6175..8914342 100644 (file)
@@ -1244,13 +1244,13 @@ struct ofputil_requestforward {
     enum ofp14_requestforward_reason reason;
     union {
         /* reason == OFPRFR_METER_MOD. */
-        struct ofputil_meter_mod *meter_mod;
-
-        /* reason == OFPRFR_GROUP_MOD. */
         struct {
-            struct ofputil_group_mod *group_mod;
+            struct ofputil_meter_mod *meter_mod;
             struct ofpbuf bands;
         };
+
+        /* reason == OFPRFR_GROUP_MOD. */
+        struct ofputil_group_mod *group_mod;
     };
 };