aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/l2/l2_fwd.c
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-06-04 00:02:37 -0400
committerJohn Lo <loj@cisco.com>2016-06-04 00:02:37 -0400
commit19042148849d2a71a79277f73aafbbd1b9478466 (patch)
tree82a713b4ee0a008f010fb3eacf5b60143584f01a /vnet/vnet/l2/l2_fwd.c
parent2671f1188d41313a6b54f5bd3d83973850f34934 (diff)
VPP-113: BVI shall filter unicast DMAC for L2 to L3 forwading
As BVI receive a packet with unicast DMAC from the BD, including unknown unicast flood packet, the packet should not be L3 forwarded unless its DMAC matches the MAC of the BVI. Change-Id: I46e18629c901062592c8ebe3a238c5cfdc1096b4 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'vnet/vnet/l2/l2_fwd.c')
-rw-r--r--vnet/vnet/l2/l2_fwd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vnet/vnet/l2/l2_fwd.c b/vnet/vnet/l2/l2_fwd.c
index 88a6b69c340..fd1f8dfe535 100644
--- a/vnet/vnet/l2/l2_fwd.c
+++ b/vnet/vnet/l2/l2_fwd.c
@@ -75,7 +75,7 @@ static vlib_node_registration_t l2fwd_node;
_(L2FWD, "L2 forward packets") \
_(FLOOD, "L2 forward misses") \
_(HIT, "L2 forward hits") \
-_(BVI_TAGGED, "BVI packet with vlan tag") \
+_(BVI_BAD_MAC, "BVI L3 MAC mismatch") \
_(BVI_ETHERTYPE, "BVI packet with unhandled ethertype") \
_(FILTER_DROP, "Filter Mac Drop") \
_(REFLECT_DROP, "Reflection Drop")
@@ -155,8 +155,8 @@ l2fwd_process (vlib_main_t * vm,
next0);
if (PREDICT_FALSE(rc)) {
- if (rc == TO_BVI_ERR_TAGGED) {
- b0->error = node->errors[L2FWD_ERROR_BVI_TAGGED];
+ if (rc == TO_BVI_ERR_BAD_MAC) {
+ b0->error = node->errors[L2FWD_ERROR_BVI_BAD_MAC];
*next0 = L2FWD_NEXT_DROP;
} else if (rc == TO_BVI_ERR_ETHERTYPE) {
b0->error = node->errors[L2FWD_ERROR_BVI_ETHERTYPE];