X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fpunt.c;h=b417427288c638087eba80597c067280309039e0;hb=ce07412a54f06900b377a7f4966f6a26e19b8f2b;hp=568350cda82ea817103c5458f6a1cb2bc1078a28;hpb=0e789423bb0d447c9d0ef62e1379d01f78939b8a;p=vpp.git diff --git a/src/vnet/ip/punt.c b/src/vnet/ip/punt.c index 568350cda82..b417427288c 100644 --- a/src/vnet/ip/punt.c +++ b/src/vnet/ip/punt.c @@ -40,7 +40,8 @@ #include #define foreach_punt_next \ - _ (PUNT, "error-punt") + _ (PUNT4, "ip4-punt") \ + _ (PUNT6, "ip6-punt") typedef enum { @@ -58,6 +59,8 @@ enum punt_socket_rx_next_e PUNT_SOCKET_RX_N_NEXT }; +#define punt_next_punt(is_ip4) (is_ip4 ? PUNT_NEXT_PUNT4 : PUNT_NEXT_PUNT6) + vlib_node_registration_t udp4_punt_node; vlib_node_registration_t udp6_punt_node; vlib_node_registration_t udp4_punt_socket_node; @@ -104,7 +107,8 @@ udp46_punt_inline (vlib_main_t * vm, { u32 n_left_to_next; - vlib_get_next_frame (vm, node, PUNT_NEXT_PUNT, to_next, n_left_to_next); + vlib_get_next_frame (vm, node, punt_next_punt (is_ip4), to_next, + n_left_to_next); while (n_left_from > 0 && n_left_to_next > 0) { @@ -123,7 +127,7 @@ udp46_punt_inline (vlib_main_t * vm, b0->error = node->errors[PUNT_ERROR_UDP_PORT]; } - vlib_put_next_frame (vm, node, PUNT_NEXT_PUNT, n_left_to_next); + vlib_put_next_frame (vm, node, punt_next_punt (is_ip4), n_left_to_next); } return from_frame->n_vectors;