ofproto: Fix uninitialized field in ofputil_flow_update.
authorAnupam Chanda <achanda@nicira.com>
Thu, 20 Sep 2012 17:35:52 +0000 (10:35 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 20 Sep 2012 18:12:10 +0000 (11:12 -0700)
Two instances of ofputil_flow_update had the priority field uninitialized.
This would cause flow updates to contain undefined priority values.

This bug was introduced by commit 81a76618 (classifier: Break cls_rule
'flow' and 'wc' members into new "struct match".)

Signed-off-by: Anupam Chanda <achanda@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
ofproto/connmgr.c
ofproto/ofproto.c

diff --git a/AUTHORS b/AUTHORS
index 70257e549ab9ee9ff119e9f2f09ba0cca3b5ce77..1ed8676c2ccf53860ef4aaac4e6ac42df3127369 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -6,6 +6,7 @@ Alexey I. Froloff       raorn@altlinux.org
 Andrew Evans            aevans@nicira.com
 Andrew Lambeth          wal@nicira.com
 Andy Southgate          andy.southgate@citrix.com
+Anupam Chanda           achanda@nicira.com
 Arun Sharma             arun.sharma@calsoftinc.com
 Ben Pfaff               blp@nicira.com
 Brian Kruger            bkruger+ovsdev@gmail.com
index 391995e7a1a4ee0ca1f1b5b55bfe50dab70dbcd7..05e69c7f9df90d4df02462f60a678143861aac22 100644 (file)
@@ -1815,6 +1815,7 @@ ofmonitor_report(struct connmgr *mgr, struct rule *rule,
                 fu.cookie = rule->flow_cookie;
                 minimatch_expand(&rule->cr.match, &match);
                 fu.match = &match;
+                fu.priority = rule->cr.priority;
                 if (flags & NXFMF_ACTIONS) {
                     fu.ofpacts = rule->ofpacts;
                     fu.ofpacts_len = rule->ofpacts_len;
index 47cf22bdb35519a2f916df8bb458d42528580836..e3b24c1a6004401a49509c5c6040db7af8f192c0 100644 (file)
@@ -3550,6 +3550,7 @@ ofproto_compose_flow_refresh_update(const struct rule *rule,
     fu.cookie = rule->flow_cookie;
     minimatch_expand(&rule->cr.match, &match);
     fu.match = &match;
+    fu.priority = rule->cr.priority;
     if (!(flags & NXFMF_ACTIONS)) {
         fu.ofpacts = NULL;
         fu.ofpacts_len = 0;