X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Fbfd%2Fbfd_udp.c;h=9d75e3ad9e0c5fdadb6ed3bf1ec05b91f81c573c;hb=e4504c6320790bba27fccf3746eb38f75f4d2e95;hp=44a4a18dbeb56ad165ebb9920340163d75e472f4;hpb=56912c896ae803fad01af390ade921be68ea5ba2;p=vpp.git diff --git a/vnet/vnet/bfd/bfd_udp.c b/vnet/vnet/bfd/bfd_udp.c index 44a4a18dbeb..9d75e3ad9e0 100644 --- a/vnet/vnet/bfd/bfd_udp.c +++ b/vnet/vnet/bfd/bfd_udp.c @@ -26,6 +26,9 @@ typedef struct mhash_t bfd_session_idx_by_bfd_key; } bfd_udp_main_t; +static vlib_node_registration_t bfd_udp4_input_node; +static vlib_node_registration_t bfd_udp6_input_node; + bfd_udp_main_t bfd_udp_main; void bfd_udp_transport_to_buffer (vlib_main_t *vm, vlib_buffer_t *b, @@ -510,12 +513,22 @@ static uword bfd_udp_input (vlib_main_t *vm, vlib_node_runtime_t *rt, if (BFD_UDP_ERROR_NONE == error0) { /* if everything went fine, check for poll bit, if present, re-use - the buffer and based on (now update) session parameters, send the + the buffer and based on (now updated) session parameters, send the final packet back */ const bfd_pkt_t *pkt = vlib_buffer_get_current (b0); if (bfd_pkt_get_poll (pkt)) { bfd_send_final (vm, b0, bs); + if (is_ipv6) + { + vlib_node_increment_counter (vm, bfd_udp6_input_node.index, + b0->error, 1); + } + else + { + vlib_node_increment_counter (vm, bfd_udp4_input_node.index, + b0->error, 1); + } next0 = BFD_UDP_INPUT_NEXT_REPLY; } }