MAC learning, like flow entry learning via the "learn" action, should only happen if a packet was actually received.
Signed-off-by: Ben Pfaff <b...@nicira.com> --- ofproto/ofproto-dpif-xlate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 73bb22e..dbfda08 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -4319,8 +4319,10 @@ xlate_push_stats(struct xlate_cache *xcache, bool may_learn, } break; case XC_NORMAL: - xlate_cache_normal(entry->u.normal.ofproto, entry->u.normal.flow, - entry->u.normal.vlan); + if (may_learn) { + xlate_cache_normal(entry->u.normal.ofproto, + entry->u.normal.flow, entry->u.normal.vlan); + } break; case XC_FIN_TIMEOUT: xlate_fin_timeout__(entry->u.fin.rule, stats->tcp_flags, -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev