From: Huanle Han Date: Fri, 5 Feb 2016 23:43:25 +0000 (-0800) Subject: ofproto-dpif-mirror: Fix bug that flag "need_revalidate" is never reset. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=c5ccf99b91d531d35bdb5e9e1b5fb5312114285a 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 Signed-off-by: Ben Pfaff --- 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