[ovs-dev] [PATCH 1/4] ofproto-dpif-xlate: Only learn MAC addresses upon handling packets.
Ben Pfaff
blp at nicira.com
Fri Aug 22 22:47:51 UTC 2014
MAC learning, like flow entry learning via the "learn" action, should only
happen if a packet was actually received.
Signed-off-by: Ben Pfaff <blp at 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
More information about the dev
mailing list