X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fgbp%2Fgbp_endpoint.c;fp=src%2Fplugins%2Fgbp%2Fgbp_endpoint.c;h=2472199e320670e4732aaff71308a4a1d6f42b4a;hb=36abbf10045ba81733410f50a3f5a9463f7137d1;hp=36e0050c39dfe0cb12e5e0787f311011d58a2b44;hpb=7bd343509fa30f9713b6efa9a4acb83e0ab86cfb;p=vpp.git diff --git a/src/plugins/gbp/gbp_endpoint.c b/src/plugins/gbp/gbp_endpoint.c index 36e0050c39d..2472199e320 100644 --- a/src/plugins/gbp/gbp_endpoint.c +++ b/src/plugins/gbp/gbp_endpoint.c @@ -254,7 +254,8 @@ gbp_endpoint_alloc (const ip46_address_t * ips, fib_node_init (&ge->ge_node, gbp_endpoint_fib_type); gei = gbp_endpoint_index (ge); ge->ge_key.gek_gbd = - ge->ge_key.gek_grd = ge->ge_fwd.gef_itf = INDEX_INVALID; + ge->ge_key.gek_grd = + ge->ge_fwd.gef_itf = ge->ge_fwd.gef_fib_index = INDEX_INVALID; ge->ge_last_time = vlib_time_now (vlib_get_main ()); ge->ge_key.gek_gbd = gbp_bridge_domain_index (gbd); @@ -602,7 +603,7 @@ gbb_endpoint_fwd_reset (gbp_endpoint_t * ge) { l2fib_del_entry (ge->ge_key.gek_mac.bytes, gbd->gb_bd_index, gef->gef_itf); - gbp_itf_set_l2_input_feature (gef->gef_itf, gei, (L2INPUT_FEAT_NONE)); + gbp_itf_set_l2_input_feature (gef->gef_itf, gei, L2INPUT_FEAT_NONE); gbp_itf_set_l2_output_feature (gef->gef_itf, gei, L2OUTPUT_FEAT_NONE); gbp_itf_unlock (gef->gef_itf); @@ -681,6 +682,7 @@ gbb_endpoint_fwd_recalc (gbp_endpoint_t * ge) rewrite = NULL; grd = gbp_route_domain_get (ge->ge_key.gek_grd); fib_index = grd->grd_fib_index[pfx->fp_proto]; + gef->gef_fib_index = fib_index; bd_add_del_ip_mac (gbd->gb_bd_index, fib_proto_to_ip46 (pfx->fp_proto), &pfx->fp_addr, &ge->ge_key.gek_mac, 1); @@ -786,7 +788,12 @@ gbb_endpoint_fwd_recalc (gbp_endpoint_t * ge) } } - if (gbp_endpoint_is_local (ge) && !gbp_endpoint_is_external (ge)) + if (gbp_endpoint_is_external (ge)) + { + gbp_itf_set_l2_input_feature (gef->gef_itf, gei, + L2INPUT_FEAT_GBP_LPM_CLASSIFY); + } + else if (gbp_endpoint_is_local (ge)) { /* * non-remote endpoints (i.e. those not arriving on iVXLAN