summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-mirror.c
diff options
context:
space:
mode:
authorHuanle Han <hanxueluo@gmail.com>2016-02-05 15:43:25 -0800
committerBen Pfaff <blp@ovn.org>2016-02-05 15:45:59 -0800
commitc5ccf99b91d531d35bdb5e9e1b5fb5312114285a (patch)
treecadac8ebffe4b5596a1b13220f2ee720e1bf52b3 /ofproto/ofproto-dpif-mirror.c
parent6c38bdc0c5bcc8b080fc689e436b35830d69eb75 (diff)
downloadopenvswitch-c5ccf99b91d531d35bdb5e9e1b5fb5312114285a.tar.gz
ofproto-dpif-mirror: Fix bug that flag "need_revalidate" is never reset.
Flag "need_revalidate" on mbridge is set to true when an ofbundle destroy. And it's never reset. It causes the backer revalidate and the mac learning flush every time 'ofproto_run' is called. Signed-off-by: Huanle Han <hanxueluo@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-mirror.c')
-rw-r--r--ofproto/ofproto-dpif-mirror.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ofproto/ofproto-dpif-mirror.c b/ofproto/ofproto-dpif-mirror.c
index f3ff5782c..6f8079a3c 100644
--- a/ofproto/ofproto-dpif-mirror.c
+++ b/ofproto/ofproto-dpif-mirror.c
@@ -131,11 +131,13 @@ mbridge_has_mirrors(struct mbridge *mbridge)
}
/* Returns true if configurations changes in 'mbridge''s mirrors require
- * revalidation. */
+ * revalidation, and resets the revalidation flag to false. */
bool
mbridge_need_revalidate(struct mbridge *mbridge)
{
- return mbridge->need_revalidate;
+ bool need_revalidate = mbridge->need_revalidate;
+ mbridge->need_revalidate = false;
+ return need_revalidate;
}
void