summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-02-11 03:01:19 +0000
committerDave Barach <openvpp@barachs.net>2020-02-11 15:49:46 +0000
commitfa2a316663e622a2feeecf8ad7d32b242370a70a (patch)
treecede26621f05ed62d026957190f24a998d249216 /src
parent4a06846dd668d7f687e6770215c38e8feb5f1740 (diff)
ip: fix ip-local errors
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie8bc5c9a03e858487cf565b4e9b520e6b496337a
Diffstat (limited to 'src')
-rw-r--r--src/vnet/ip/ip4.h1
-rw-r--r--src/vnet/ip/ip4_forward.c4
-rw-r--r--src/vnet/ip/ip4_input.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/ip/ip4.h b/src/vnet/ip/ip4.h
index a7e05a41f75..bed552b982c 100644
--- a/src/vnet/ip/ip4.h
+++ b/src/vnet/ip/ip4.h
@@ -178,6 +178,7 @@ typedef struct ip4_main_t
/** Global ip4 main structure. */
extern ip4_main_t ip4_main;
+extern char *ip4_error_strings[];
/** Global ip4 input node. Errors get attached to ip4 input node. */
extern vlib_node_registration_t ip4_input_node;
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 40ae51ccd3b..95db9314d9b 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -1696,7 +1696,7 @@ ip4_local_inline (vlib_main_t * vm,
{
u32 *from, n_left_from;
vlib_node_runtime_t *error_node =
- vlib_node_get_runtime (vm, ip4_input_node.index);
+ vlib_node_get_runtime (vm, ip4_local_node.index);
u16 nexts[VLIB_FRAME_SIZE], *next;
vlib_buffer_t *bufs[VLIB_FRAME_SIZE], **b;
ip4_header_t *ip[2];
@@ -1825,6 +1825,8 @@ VLIB_REGISTER_NODE (ip4_local_node) =
.name = "ip4-local",
.vector_size = sizeof (u32),
.format_trace = format_ip4_forward_next_trace,
+ .n_errors = IP4_N_ERROR,
+ .error_strings = ip4_error_strings,
.n_next_nodes = IP_LOCAL_N_NEXT,
.next_nodes =
{
diff --git a/src/vnet/ip/ip4_input.h b/src/vnet/ip/ip4_input.h
index 5df2154b2c3..383ef31758c 100644
--- a/src/vnet/ip/ip4_input.h
+++ b/src/vnet/ip/ip4_input.h
@@ -43,8 +43,6 @@
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
-extern char *ip4_error_strings[];
-
typedef enum
{
IP4_INPUT_NEXT_DROP,