X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fping.c;h=096b2ebfbdadc03ff28055e9e0058ec6f6416f2d;hb=067cd6229a47ea3ba8b59a2a04090e80afb5bd2c;hp=f438ce960606ba9aeb27e6ef7426f4274a2e821b;hpb=71612d61930e57e7c8ebf9e5647b15a4b23720b2;p=vpp.git diff --git a/src/vnet/ip/ping.c b/src/vnet/ip/ping.c index f438ce96060..096b2ebfbda 100755 --- a/src/vnet/ip/ping.c +++ b/src/vnet/ip/ping.c @@ -155,8 +155,8 @@ VLIB_REGISTER_NODE (ip6_icmp_echo_reply_node, static) = .format_trace = format_icmp_echo_trace, .n_next_nodes = ICMP6_ECHO_REPLY_N_NEXT, .next_nodes = { - [ICMP6_ECHO_REPLY_NEXT_DROP] = "error-drop", - [ICMP6_ECHO_REPLY_NEXT_PUNT] = "error-punt", + [ICMP6_ECHO_REPLY_NEXT_DROP] = "ip6-drop", + [ICMP6_ECHO_REPLY_NEXT_PUNT] = "ip6-punt", }, }; /* *INDENT-ON* */ @@ -213,8 +213,8 @@ VLIB_REGISTER_NODE (ip4_icmp_echo_reply_node, static) = .format_trace = format_icmp_echo_trace, .n_next_nodes = ICMP4_ECHO_REPLY_N_NEXT, .next_nodes = { - [ICMP4_ECHO_REPLY_NEXT_DROP] = "error-drop", - [ICMP4_ECHO_REPLY_NEXT_PUNT] = "error-punt", + [ICMP4_ECHO_REPLY_NEXT_DROP] = "ip4-drop", + [ICMP4_ECHO_REPLY_NEXT_PUNT] = "ip4-punt", }, }; /* *INDENT-ON* */ @@ -314,13 +314,14 @@ send_ip6_ping (vlib_main_t * vm, ip6_main_t * im, h0->ip6.src_address = *pa6; /* Fill in the correct source now */ - ip6_address_t *a = ip6_interface_first_address (im, sw_if_index); - if (!a) + if (!ip6_src_address_for_packet (&im->lookup_main, + sw_if_index, + &h0->ip6.dst_address, + &h0->ip6.src_address)) { vlib_buffer_free (vm, &bi0, 1); return SEND_PING_NO_SRC_ADDRESS; } - h0->ip6.src_address = a[0]; /* Fill in icmp fields */ h0->icmp.type = ICMP6_echo_request; @@ -576,7 +577,7 @@ run_ping_ip46_address (vlib_main_t * vm, u32 table_id, ip4_address_t * pa4, pool_get (pm->ping_runs, pr); ping_run_index = pr - pm->ping_runs; pr->cli_process_id = curr_proc; - pr->cli_thread_index = vlib_get_thread_index (); + pr->cli_thread_index = vm->thread_index; pr->icmp_id = icmp_id; hash_set (pm->ping_run_by_icmp_id, icmp_id, ping_run_index); for (i = 1; i <= ping_repeat; i++)