X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip_api.c;h=25d0b8be09e19ac55fc75c5381e55b2c1312efb3;hb=7425f9289bdc17d330044b0df0fc31cdeeca626b;hp=f58ca079b041bdbaae07fc25aac0861183216a37;hpb=72f7782dc57305ac86094dd16d7eccf8e0b74559;p=vpp.git diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index f58ca079b04..25d0b8be09e 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -813,7 +813,13 @@ add_del_route_t_handler (u8 is_multipath, path.frp_eos = MPLS_NON_EOS; } if (is_local) - path_flags |= FIB_ROUTE_PATH_LOCAL; + { + path_flags |= FIB_ROUTE_PATH_LOCAL; + if (~0 != next_hop_sw_if_index) + { + entry_flags |= (FIB_ENTRY_FLAG_CONNECTED | FIB_ENTRY_FLAG_LOCAL); + } + } if (is_dvr) path_flags |= FIB_ROUTE_PATH_DVR; if (is_resolve_host) @@ -843,7 +849,8 @@ add_del_route_t_handler (u8 is_multipath, stats_dslock_with_hint (1 /* release hint */ , 2 /* tag */ ); - if (is_drop || is_local || is_classify || is_unreach || is_prohibit) + if (is_drop || (is_local && (~0 == next_hop_sw_if_index)) || + is_classify || is_unreach || is_prohibit) { /* * special route types that link directly to the adj