From 6b140a4eb3c4281e75fd810cdd3eb83d0d907e61 Mon Sep 17 00:00:00 2001 From: Anupam Chanda Date: Thu, 20 Sep 2012 10:35:52 -0700 Subject: [PATCH] ofproto: Fix uninitialized field in ofputil_flow_update. 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 Signed-off-by: Ben Pfaff --- AUTHORS | 1 + ofproto/connmgr.c | 1 + ofproto/ofproto.c | 1 + 3 files changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index 70257e549..1ed8676c2 100644 --- 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 diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 391995e7a..05e69c7f9 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -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; diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 47cf22bdb..e3b24c1a6 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -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; -- 2.43.0