diff options
author | John Lo <loj@cisco.com> | 2018-08-09 11:03:21 -0400 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2018-08-09 17:03:01 +0000 |
commit | fe80c49740f1cf51c3e0414e0b4540fe985a59e4 (patch) | |
tree | ead21a78554bb5cd1a7710882c109bf596058495 /src/vnet/l2/l2_flood.c | |
parent | 49433adb9145bfd3a9cbaa99b01c6c14aeda71a4 (diff) |
Fix L2 flooding to BVI with error return not working
Change-Id: Id0b0e9bf1a7ba02144ec75783378352423f7a4b9
Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_flood.c')
-rw-r--r-- | src/vnet/l2/l2_flood.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vnet/l2/l2_flood.c b/src/vnet/l2/l2_flood.c index 97f1387ee94..8a635cec208 100644 --- a/src/vnet/l2/l2_flood.c +++ b/src/vnet/l2/l2_flood.c @@ -168,7 +168,7 @@ l2flood_node_fn (vlib_main_t * vm, bi0 = from[0]; from += 1; n_left_from -= 1; - next0 = L2FLOOD_NEXT_DROP; + next0 = L2FLOOD_NEXT_L2_OUTPUT; b0 = vlib_get_buffer (vm, bi0); @@ -263,7 +263,6 @@ l2flood_node_fn (vlib_main_t * vm, /* Do normal L2 forwarding */ vnet_buffer (c0)->sw_if_index[VLIB_TX] = member->sw_if_index; - next0 = L2FLOOD_NEXT_L2_OUTPUT; vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, @@ -314,7 +313,7 @@ l2flood_node_fn (vlib_main_t * vm, msm->vnet_main, c0, member->sw_if_index, &msm->l3_next, &next0); - if (PREDICT_FALSE (rc)) + if (PREDICT_FALSE (rc != TO_BVI_ERR_OK)) { if (rc == TO_BVI_ERR_BAD_MAC) { @@ -324,13 +323,13 @@ l2flood_node_fn (vlib_main_t * vm, { c0->error = node->errors[L2FLOOD_ERROR_BVI_ETHERTYPE]; } + next0 = L2FLOOD_NEXT_DROP; } } else { /* Do normal L2 forwarding */ vnet_buffer (c0)->sw_if_index[VLIB_TX] = member->sw_if_index; - next0 = L2FLOOD_NEXT_L2_OUTPUT; } vlib_validate_buffer_enqueue_x1 (vm, node, next_index, |