Fix icmp/udp/tcp punt/drop paths

Send packets to ip4/6_punt/drop nodes instead of error-drop/punt nodes

dbarach: clean up an annoying checkstyle issue: indent 2.2.10
(OpenSUSE version) and indent 2.2.11 (Ubuntu / CentOS versions) had an
artistic disagreement about ip_frag.c.

Change-Id: I660bee28a064af9c6c70371363081e941d1c3a94
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/src/vnet/ip/icmp4.c b/src/vnet/ip/icmp4.c
index bbeab32..1fe01e4 100644
--- a/src/vnet/ip/icmp4.c
+++ b/src/vnet/ip/icmp4.c
@@ -219,7 +219,7 @@
 
   .n_next_nodes = 1,
   .next_nodes = {
-    [ICMP_INPUT_NEXT_ERROR] = "error-punt",
+    [ICMP_INPUT_NEXT_ERROR] = "ip4-punt",
   },
 };
 /* *INDENT-ON* */
@@ -592,7 +592,7 @@
 
   .n_next_nodes = IP4_ICMP_ERROR_N_NEXT,
   .next_nodes = {
-    [IP4_ICMP_ERROR_NEXT_DROP] = "error-drop",
+    [IP4_ICMP_ERROR_NEXT_DROP] = "ip4-drop",
     [IP4_ICMP_ERROR_NEXT_LOOKUP] = "ip4-lookup",
   },
 
diff --git a/src/vnet/ip/icmp6.c b/src/vnet/ip/icmp6.c
index 70696d0..ab871b3 100644
--- a/src/vnet/ip/icmp6.c
+++ b/src/vnet/ip/icmp6.c
@@ -250,7 +250,7 @@
 
   .n_next_nodes = 1,
   .next_nodes = {
-    [ICMP_INPUT_NEXT_DROP] = "error-drop",
+    [ICMP_INPUT_NEXT_DROP] = "ip6-drop",
   },
 };
 /* *INDENT-ON* */
@@ -663,7 +663,7 @@
 
   .n_next_nodes = IP6_ICMP_ERROR_N_NEXT,
   .next_nodes = {
-    [IP6_ICMP_ERROR_NEXT_DROP] = "error-drop",
+    [IP6_ICMP_ERROR_NEXT_DROP] = "ip6-drop",
     [IP6_ICMP_ERROR_NEXT_LOOKUP] = "ip6-lookup",
   },
 
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 2f3f340..9c57757 100755
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -2727,7 +2727,7 @@
 
     <em>Next Indices:</em>
     - <code> adj->rewrite_header.next_index </code>
-      or @c error-drop
+      or @c ip4-drop
 */
 static uword
 ip4_rewrite (vlib_main_t * vm,
@@ -2779,7 +2779,7 @@
 
   .n_next_nodes = 2,
   .next_nodes = {
-    [IP4_REWRITE_NEXT_DROP] = "error-drop",
+    [IP4_REWRITE_NEXT_DROP] = "ip4-drop",
     [IP4_REWRITE_NEXT_ICMP_ERROR] = "ip4-icmp-error",
   },
 };
diff --git a/src/vnet/ip/ip4_source_and_port_range_check.c b/src/vnet/ip/ip4_source_and_port_range_check.c
index d1f18dd..06e6e7c 100644
--- a/src/vnet/ip/ip4_source_and_port_range_check.c
+++ b/src/vnet/ip/ip4_source_and_port_range_check.c
@@ -593,7 +593,7 @@
 
   .n_next_nodes = IP4_SOURCE_AND_PORT_RANGE_CHECK_N_NEXT,
   .next_nodes = {
-    [IP4_SOURCE_AND_PORT_RANGE_CHECK_NEXT_DROP] = "error-drop",
+    [IP4_SOURCE_AND_PORT_RANGE_CHECK_NEXT_DROP] = "ip4-drop",
   },
 
   .format_buffer = format_ip4_header,
@@ -612,7 +612,7 @@
 
   .n_next_nodes = IP4_SOURCE_AND_PORT_RANGE_CHECK_N_NEXT,
   .next_nodes = {
-    [IP4_SOURCE_AND_PORT_RANGE_CHECK_NEXT_DROP] = "error-drop",
+    [IP4_SOURCE_AND_PORT_RANGE_CHECK_NEXT_DROP] = "ip4-drop",
   },
 
   .format_buffer = format_ip4_header,
@@ -777,7 +777,7 @@
  * Example of graph node before range checking is enabled:
  * @cliexstart{show vlib graph ip4-source-and-port-range-check-tx}
  *            Name                      Next                    Previous
- * ip4-source-and-port-range-      error-drop [0]
+ * ip4-source-and-port-range-      ip4-drop [0]
  * @cliexend
  *
  * Example of how to enable range checking on TX:
@@ -786,7 +786,7 @@
  * Example of graph node after range checking is enabled:
  * @cliexstart{show vlib graph ip4-source-and-port-range-check-tx}
  *            Name                      Next                    Previous
- * ip4-source-and-port-range-      error-drop [0]              ip4-rewrite
+ * ip4-source-and-port-range-      ip4-drop [0]                ip4-rewrite
  *                              interface-output [1]
  * @cliexend
  *
diff --git a/src/vnet/ip/ip4_source_check.c b/src/vnet/ip/ip4_source_check.c
index 17a1cb1..25c5127 100644
--- a/src/vnet/ip/ip4_source_check.c
+++ b/src/vnet/ip/ip4_source_check.c
@@ -309,7 +309,7 @@
 
   .n_next_nodes = IP4_SOURCE_CHECK_N_NEXT,
   .next_nodes = {
-    [IP4_SOURCE_CHECK_NEXT_DROP] = "error-drop",
+    [IP4_SOURCE_CHECK_NEXT_DROP] = "ip4-drop",
   },
 
   .format_buffer = format_ip4_header,
@@ -328,7 +328,7 @@
 
   .n_next_nodes = IP4_SOURCE_CHECK_N_NEXT,
   .next_nodes = {
-    [IP4_SOURCE_CHECK_NEXT_DROP] = "error-drop",
+    [IP4_SOURCE_CHECK_NEXT_DROP] = "ip4-drop",
   },
 
   .format_buffer = format_ip4_header,
@@ -405,7 +405,7 @@
  * Example of graph node before range checking is enabled:
  * @cliexstart{show vlib graph ip4-source-check-via-rx}
  *            Name                      Next                    Previous
- * ip4-source-check-via-rx         error-drop [0]
+ * ip4-source-check-via-rx         ip4-drop [0]
  * @cliexend
  *
  * Example of how to enable unicast source checking on an interface:
@@ -414,7 +414,7 @@
  * Example of graph node after range checking is enabled:
  * @cliexstart{show vlib graph ip4-source-check-via-rx}
  *            Name                      Next                    Previous
- * ip4-source-check-via-rx         error-drop [0]         ip4-input-no-checksum
+ * ip4-source-check-via-rx         ip4-drop [0]           ip4-input-no-checksum
  *                           ip4-source-and-port-range-         ip4-input
  * @cliexend
  *
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index 67fedc9..29cd3ca 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -1902,7 +1902,7 @@
   .n_next_nodes = IP6_DISCOVER_NEIGHBOR_N_NEXT,
   .next_nodes =
   {
-    [IP6_DISCOVER_NEIGHBOR_NEXT_DROP] = "error-drop",
+    [IP6_DISCOVER_NEIGHBOR_NEXT_DROP] = "ip6-drop",
     [IP6_DISCOVER_NEIGHBOR_NEXT_REPLY_TX] = "interface-output",
   },
 };
@@ -1920,7 +1920,7 @@
   .n_next_nodes = IP6_DISCOVER_NEIGHBOR_N_NEXT,
   .next_nodes =
   {
-    [IP6_DISCOVER_NEIGHBOR_NEXT_DROP] = "error-drop",
+    [IP6_DISCOVER_NEIGHBOR_NEXT_DROP] = "ip6-drop",
     [IP6_DISCOVER_NEIGHBOR_NEXT_REPLY_TX] = "interface-output",
   },
 };
@@ -2432,7 +2432,7 @@
   .n_next_nodes = 2,
   .next_nodes =
   {
-    [IP6_REWRITE_NEXT_DROP] = "error-drop",
+    [IP6_REWRITE_NEXT_DROP] = "ip6-drop",
     [IP6_REWRITE_NEXT_ICMP_ERROR] = "ip6-icmp-error",
   },
 };
diff --git a/src/vnet/ip/ip6_hop_by_hop.c b/src/vnet/ip/ip6_hop_by_hop.c
index 14fbb39..90a4d21 100644
--- a/src/vnet/ip/ip6_hop_by_hop.c
+++ b/src/vnet/ip/ip6_hop_by_hop.c
@@ -46,7 +46,7 @@
 #define foreach_ip6_hbyh_ioam_input_next	\
   _(IP6_REWRITE, "ip6-rewrite")			\
   _(IP6_LOOKUP, "ip6-lookup")			\
-  _(DROP, "error-drop")
+  _(DROP, "ip6-drop")
 
 typedef enum
 {
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index d549ac3..82b402f 100644
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -2435,7 +2435,7 @@
 
   .n_next_nodes = ICMP6_ROUTER_SOLICITATION_N_NEXT,
   .next_nodes = {
-    [ICMP6_ROUTER_SOLICITATION_NEXT_DROP] = "error-drop",
+    [ICMP6_ROUTER_SOLICITATION_NEXT_DROP] = "ip6-drop",
     [ICMP6_ROUTER_SOLICITATION_NEXT_REPLY_RW] = "ip6-rewrite-mcast",
     [ICMP6_ROUTER_SOLICITATION_NEXT_REPLY_TX] = "interface-output",
   },
@@ -2628,7 +2628,7 @@
 
   .n_next_nodes = 1,
   .next_nodes = {
-    [0] = "error-drop",
+    [0] = "ip6-drop",
   },
 };
 /* *INDENT-ON* */
@@ -2671,7 +2671,7 @@
 
   .n_next_nodes = ICMP6_NEIGHBOR_SOLICITATION_N_NEXT,
   .next_nodes = {
-    [ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP] = "error-drop",
+    [ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP] = "ip6-drop",
     [ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY] = "interface-output",
   },
 };
@@ -2689,7 +2689,7 @@
 
   .n_next_nodes = 1,
   .next_nodes = {
-    [0] = "error-drop",
+    [0] = "ip6-drop",
   },
 };
 /* *INDENT-ON* */
diff --git a/src/vnet/ip/ip_frag.c b/src/vnet/ip/ip_frag.c
index ca062bf..2af697e 100644
--- a/src/vnet/ip/ip_frag.c
+++ b/src/vnet/ip/ip_frag.c
@@ -90,8 +90,8 @@
       ip_frag_id = ip4->fragment_id;
       ip_frag_offset = ip4_get_fragment_offset (ip4);
       more =
-	! !(ip4->flags_and_fragment_offset &
-	    clib_host_to_net_u16 (IP4_HEADER_FLAG_MORE_FRAGMENTS));
+	!(!(ip4->flags_and_fragment_offset &
+	    clib_host_to_net_u16 (IP4_HEADER_FLAG_MORE_FRAGMENTS)));
     }
   else
     {
@@ -239,10 +239,12 @@
 	      next0 = IP4_FRAG_NEXT_ICMP_ERROR;
 	    }
 	  else
-	    next0 =
-	      (error0 ==
-	       IP_FRAG_ERROR_NONE) ? vnet_buffer (p0)->
-	      ip_frag.next_index : IP4_FRAG_NEXT_DROP;
+	    {
+              /* *INDENT-OFF* */
+              next0 = (error0 == IP_FRAG_ERROR_NONE) ? vnet_buffer (p0)->
+                ip_frag.next_index : IP4_FRAG_NEXT_DROP;
+              /* *INDENT-ON* */
+	    }
 
 	  if (error0 == IP_FRAG_ERROR_NONE)
 	    {
@@ -482,10 +484,11 @@
 	      tr->next = vnet_buffer (p0)->ip_frag.next_index;
 	    }
 
-	  next0 =
-	    (error0 ==
-	     IP_FRAG_ERROR_NONE) ? vnet_buffer (p0)->
+          /* *INDENT-OFF* */
+	  next0 = (error0 == IP_FRAG_ERROR_NONE) ? vnet_buffer (p0)->
 	    ip_frag.next_index : IP6_FRAG_NEXT_DROP;
+          /* *INDENT-ON* */
+
 	  frag_sent += vec_len (buffer);
 	  small_packets += (vec_len (buffer) == 1);
 
@@ -547,7 +550,7 @@
     [IP4_FRAG_NEXT_IP4_LOOKUP] = "ip4-lookup",
     [IP4_FRAG_NEXT_IP6_LOOKUP] = "ip6-lookup",
     [IP4_FRAG_NEXT_ICMP_ERROR] = "ip4-icmp-error",
-    [IP4_FRAG_NEXT_DROP] = "error-drop"
+    [IP4_FRAG_NEXT_DROP] = "ip4-drop"
   },
 };
 /* *INDENT-ON* */
@@ -567,7 +570,7 @@
   .next_nodes = {
     [IP6_FRAG_NEXT_IP4_LOOKUP] = "ip4-lookup",
     [IP6_FRAG_NEXT_IP6_LOOKUP] = "ip6-lookup",
-    [IP6_FRAG_NEXT_DROP] = "error-drop"
+    [IP6_FRAG_NEXT_DROP] = "ip6-drop"
   },
 };
 /* *INDENT-ON* */
diff --git a/src/vnet/ip/ip_input_acl.c b/src/vnet/ip/ip_input_acl.c
index 4d365a4..3c54fe8 100644
--- a/src/vnet/ip/ip_input_acl.c
+++ b/src/vnet/ip/ip_input_acl.c
@@ -402,7 +402,7 @@
 
   .n_next_nodes = ACL_NEXT_INDEX_N_NEXT,
   .next_nodes = {
-    [ACL_NEXT_INDEX_DENY] = "error-drop",
+    [ACL_NEXT_INDEX_DENY] = "ip4-drop",
   },
 };
 /* *INDENT-ON* */
@@ -427,7 +427,7 @@
 
   .n_next_nodes = ACL_NEXT_INDEX_N_NEXT,
   .next_nodes = {
-    [ACL_NEXT_INDEX_DENY] = "error-drop",
+    [ACL_NEXT_INDEX_DENY] = "ip6-drop",
   },
 };
 /* *INDENT-ON* */
diff --git a/src/vnet/ip/ping.c b/src/vnet/ip/ping.c
index f438ce9..a142754 100755
--- a/src/vnet/ip/ping.c
+++ b/src/vnet/ip/ping.c
@@ -155,8 +155,8 @@
   .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 @@
   .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* */
diff --git a/src/vnet/ip/punt.c b/src/vnet/ip/punt.c
index 568350c..b417427 100644
--- a/src/vnet/ip/punt.c
+++ b/src/vnet/ip/punt.c
@@ -40,7 +40,8 @@
 #include <stdbool.h>
 
 #define foreach_punt_next			\
-  _ (PUNT, "error-punt")
+  _ (PUNT4, "ip4-punt")                         \
+  _ (PUNT6, "ip6-punt")
 
 typedef enum
 {
@@ -58,6 +59,8 @@
   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 @@
     {
       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 @@
 	  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;
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 702a94f..b0ea24f 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -27,7 +27,8 @@
 
 /* All TCP nodes have the same outgoing arcs */
 #define foreach_tcp_state_next                  \
-  _ (DROP, "error-drop")                        \
+  _ (DROP4, "ip4-drop")                         \
+  _ (DROP6, "ip6-drop")                         \
   _ (TCP4_OUTPUT, "tcp4-output")                \
   _ (TCP6_OUTPUT, "tcp6-output")
 
@@ -75,6 +76,9 @@
 #define tcp_next_output(is_ip4) (is_ip4 ? TCP_NEXT_TCP4_OUTPUT          \
                                         : TCP_NEXT_TCP6_OUTPUT)
 
+#define tcp_next_drop(is_ip4) (is_ip4 ? TCP_NEXT_DROP4                  \
+                                      : TCP_NEXT_DROP6)
+
 vlib_node_registration_t tcp4_established_node;
 vlib_node_registration_t tcp6_established_node;
 
@@ -1554,7 +1558,7 @@
       if (seq_lt (vnet_buffer (b)->tcp.seq_number, tc->rcv_nxt))
 	{
 	  error = TCP_ERROR_SEGMENT_OLD;
-	  *next0 = TCP_NEXT_DROP;
+	  *next0 = tcp_next_drop (tc->c_is_ip4);
 
 	  /* Completely in the past (possible retransmit) */
 	  if (seq_leq (vnet_buffer (b)->tcp.seq_end, tc->rcv_nxt))
@@ -1707,7 +1711,7 @@
 	  vlib_buffer_t *b0;
 	  tcp_header_t *th0 = 0;
 	  tcp_connection_t *tc0;
-	  u32 next0 = TCP_ESTABLISHED_NEXT_DROP, error0 = TCP_ERROR_ENQUEUED;
+	  u32 next0 = tcp_next_drop (is_ip4), error0 = TCP_ERROR_ENQUEUED;
 
 	  bi0 = from[0];
 	  to_next[0] = bi0;
@@ -1967,7 +1971,7 @@
 	  tcp_header_t *tcp0 = 0;
 	  tcp_connection_t *tc0;
 	  tcp_connection_t *new_tc0;
-	  u32 next0 = TCP_SYN_SENT_NEXT_DROP, error0 = TCP_ERROR_ENQUEUED;
+	  u32 next0 = tcp_next_drop (is_ip4), error0 = TCP_ERROR_ENQUEUED;
 
 	  bi0 = from[0];
 	  to_next[0] = bi0;
@@ -2294,7 +2298,7 @@
 	  vlib_buffer_t *b0;
 	  tcp_header_t *tcp0 = 0;
 	  tcp_connection_t *tc0;
-	  u32 next0 = TCP_RCV_PROCESS_NEXT_DROP, error0 = TCP_ERROR_ENQUEUED;
+	  u32 next0 = tcp_next_drop (is_ip4), error0 = TCP_ERROR_ENQUEUED;
 	  u8 is_fin0;
 
 	  bi0 = from[0];
@@ -2690,7 +2694,7 @@
 	  ip4_header_t *ip40;
 	  ip6_header_t *ip60;
 	  tcp_connection_t *child0;
-	  u32 error0 = TCP_ERROR_SYNS_RCVD, next0 = TCP_LISTEN_NEXT_DROP;
+	  u32 error0 = TCP_ERROR_SYNS_RCVD, next0 = tcp_next_drop (is_ip4);
 
 	  bi0 = from[0];
 	  to_next[0] = bi0;
@@ -2895,22 +2899,22 @@
 } tcp_input_next_t;
 
 #define foreach_tcp4_input_next                 \
-  _ (DROP, "error-drop")                        \
+  _ (DROP, "ip4-drop")                          \
   _ (LISTEN, "tcp4-listen")                     \
   _ (RCV_PROCESS, "tcp4-rcv-process")           \
   _ (SYN_SENT, "tcp4-syn-sent")                 \
   _ (ESTABLISHED, "tcp4-established")		\
   _ (RESET, "tcp4-reset")			\
-  _ (PUNT, "error-punt")
+  _ (PUNT, "ip4-punt")
 
 #define foreach_tcp6_input_next                 \
-  _ (DROP, "error-drop")                        \
+  _ (DROP, "ip6-drop")                          \
   _ (LISTEN, "tcp6-listen")                     \
   _ (RCV_PROCESS, "tcp6-rcv-process")           \
   _ (SYN_SENT, "tcp6-syn-sent")                 \
   _ (ESTABLISHED, "tcp6-established")		\
   _ (RESET, "tcp6-reset")			\
-  _ (PUNT, "error-punt")
+  _ (PUNT, "ip6-punt")
 
 #define filter_flags (TCP_FLAG_SYN|TCP_FLAG_ACK|TCP_FLAG_RST|TCP_FLAG_FIN)
 
diff --git a/src/vnet/udp/udp_local.c b/src/vnet/udp/udp_local.c
index ce9bb02..f0d9530 100644
--- a/src/vnet/udp/udp_local.c
+++ b/src/vnet/udp/udp_local.c
@@ -24,8 +24,10 @@
 udp_main_t udp_main;
 
 #define foreach_udp_local_next                  \
-  _ (PUNT, "error-punt")                        \
-  _ (DROP, "error-drop")                        \
+  _ (PUNT4, "ip4-punt")                         \
+  _ (PUNT6, "ip6-punt")                         \
+  _ (DROP4, "ip4-drop")                         \
+  _ (DROP6, "ip6-drop")                         \
   _ (ICMP4_ERROR, "ip4-icmp-error")             \
   _ (ICMP6_ERROR, "ip6-icmp-error")
 
@@ -37,6 +39,9 @@
     UDP_LOCAL_N_NEXT,
 } udp_local_next_t;
 
+#define udp_local_next_drop(is_ip4)      ((is_ip4) ? UDP_LOCAL_NEXT_DROP4 : UDP_LOCAL_NEXT_DROP6)
+#define udp_local_next_punt(is_ip4)      ((is_ip4) ? UDP_LOCAL_NEXT_PUNT4 : UDP_LOCAL_NEXT_PUNT6)
+
 typedef struct
 {
   u16 src_port;
@@ -132,7 +137,7 @@
 	  if (PREDICT_FALSE (b0->current_length < advance0 + sizeof (*h0)))
 	    {
 	      error0 = UDP_ERROR_LENGTH_ERROR;
-	      next0 = UDP_LOCAL_NEXT_DROP;
+	      next0 = udp_local_next_drop (is_ip4);
 	    }
 	  else
 	    {
@@ -143,14 +148,14 @@
 				 vlib_buffer_length_in_chain (vm, b0)))
 		{
 		  error0 = UDP_ERROR_LENGTH_ERROR;
-		  next0 = UDP_LOCAL_NEXT_DROP;
+		  next0 = udp_local_next_drop (is_ip4);
 		}
 	    }
 
 	  if (PREDICT_FALSE (b1->current_length < advance1 + sizeof (*h1)))
 	    {
 	      error1 = UDP_ERROR_LENGTH_ERROR;
-	      next1 = UDP_LOCAL_NEXT_DROP;
+	      next1 = udp_local_next_drop (is_ip4);
 	    }
 	  else
 	    {
@@ -161,7 +166,7 @@
 				 vlib_buffer_length_in_chain (vm, b1)))
 		{
 		  error1 = UDP_ERROR_LENGTH_ERROR;
-		  next1 = UDP_LOCAL_NEXT_DROP;
+		  next1 = udp_local_next_drop (is_ip4);
 		}
 	    }
 
@@ -187,7 +192,7 @@
 	      if (PREDICT_FALSE (punt_unknown))
 		{
 		  b0->error = node->errors[UDP_ERROR_PUNT];
-		  next0 = UDP_LOCAL_NEXT_PUNT;
+		  next0 = udp_local_next_punt (is_ip4);
 		}
 	      else if (is_ip4)
 		{
@@ -224,7 +229,7 @@
 	      if (PREDICT_FALSE (punt_unknown))
 		{
 		  b1->error = node->errors[UDP_ERROR_PUNT];
-		  next1 = UDP_LOCAL_NEXT_PUNT;
+		  next1 = udp_local_next_punt (is_ip4);
 		}
 	      else if (is_ip4)
 		{
@@ -308,7 +313,7 @@
 	  if (PREDICT_FALSE (b0->current_length < advance0 + sizeof (*h0)))
 	    {
 	      b0->error = node->errors[UDP_ERROR_LENGTH_ERROR];
-	      next0 = UDP_LOCAL_NEXT_DROP;
+	      next0 = udp_local_next_drop (is_ip4);
 	      goto trace_x1;
 	    }
 
@@ -333,7 +338,7 @@
 		  if (PREDICT_FALSE (punt_unknown))
 		    {
 		      b0->error = node->errors[UDP_ERROR_PUNT];
-		      next0 = UDP_LOCAL_NEXT_PUNT;
+		      next0 = udp_local_next_punt (is_ip4);
 		    }
 		  else if (is_ip4)
 		    {
@@ -364,7 +369,7 @@
 	  else
 	    {
 	      b0->error = node->errors[UDP_ERROR_LENGTH_ERROR];
-	      next0 = UDP_LOCAL_NEXT_DROP;
+	      next0 = udp_local_next_drop (is_ip4);
 	    }
 
 	trace_x1: