[ovs-dev] [PATCH] ofp-util: Fix struct ofputil_requestforward union membership.

Ben Pfaff blp at nicira.com
Thu Sep 10 17:00:41 UTC 2015


'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 at gmail.com>
Reported-at: http://openvswitch.org/pipermail/dev/2015-September/059847.html
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 lib/ofp-util.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/ofp-util.h b/lib/ofp-util.h
index cbd6175..8914342 100644
--- a/lib/ofp-util.h
+++ b/lib/ofp-util.h
@@ -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;
     };
 };
 
-- 
2.1.3




More information about the dev mailing list