X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Flookup.c;h=e0d1ac06dfbcfe259243997c602d0198a662bdc0;hb=b361076e24e02243605a681b96aa65e9b5e27bfb;hp=216af4ce37183959caa380ad211c61a65dd78baf;hpb=4c53313cd7e9b866412ad3e04b2d91ac098c1398;p=vpp.git diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c index 216af4ce371..e0d1ac06dfb 100644 --- a/src/vnet/ip/lookup.c +++ b/src/vnet/ip/lookup.c @@ -899,17 +899,37 @@ vnet_ip_mroute_cmd (vlib_main_t * vm, pfx.fp_proto = FIB_PROTOCOL_IP6; pfx.fp_len = 128; } + else if (unformat (line_input, "via %U %U", + unformat_ip4_address, &rpath.frp_addr.ip4, + unformat_vnet_sw_interface, vnm, + &rpath.frp_sw_if_index)) + { + rpath.frp_weight = 1; + } + else if (unformat (line_input, "via %U %U", + unformat_ip6_address, &rpath.frp_addr.ip6, + unformat_vnet_sw_interface, vnm, + &rpath.frp_sw_if_index)) + { + rpath.frp_weight = 1; + } else if (unformat (line_input, "via %U", unformat_vnet_sw_interface, vnm, &rpath.frp_sw_if_index)) { + memset (&rpath.frp_addr, 0, sizeof (rpath.frp_addr)); rpath.frp_weight = 1; } else if (unformat (line_input, "via local")) { + memset (&rpath.frp_addr, 0, sizeof (rpath.frp_addr)); rpath.frp_sw_if_index = ~0; rpath.frp_weight = 1; rpath.frp_flags |= FIB_ROUTE_PATH_LOCAL; + /* + * set the path proto appropriately for the prefix + */ + rpath.frp_proto = fib_proto_to_dpo (pfx.fp_proto); } else if (unformat (line_input, "%U", unformat_mfib_itf_flags, &iflags)) ; @@ -1081,7 +1101,7 @@ ip6_probe_neighbor_wait (vlib_main_t * vm, ip6_address_t * a, u32 sw_if_index, for (i = 0; i < retry_count; i++) { /* The interface may be down, etc. */ - e = ip6_probe_neighbor (vm, a, sw_if_index); + e = ip6_probe_neighbor (vm, a, sw_if_index, 0); if (e) return e; @@ -1133,7 +1153,7 @@ ip4_probe_neighbor_wait (vlib_main_t * vm, ip4_address_t * a, u32 sw_if_index, for (i = 0; i < retry_count; i++) { /* The interface may be down, etc. */ - e = ip4_probe_neighbor (vm, a, sw_if_index); + e = ip4_probe_neighbor (vm, a, sw_if_index, 0); if (e) return e;