From 43289951b23e491510baf1cedfad884321e83c30 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Thu, 9 Sep 2021 11:58:28 +0200 Subject: ip: fix path MTU node errors definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The path mtu node uses errors defined by ip fragmentation. Type: fix Change-Id: I1f173955919a4f555ab0309cd8201ec342a0ae92 Signed-off-by: Benoît Ganne --- src/vnet/ip/ip_frag.c | 2 +- src/vnet/ip/ip_frag.h | 2 ++ src/vnet/ip/ip_path_mtu_node.c | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/vnet') diff --git a/src/vnet/ip/ip_frag.c b/src/vnet/ip/ip_frag.c index cafa9a66d6b..b9bc90dcc11 100644 --- a/src/vnet/ip/ip_frag.c +++ b/src/vnet/ip/ip_frag.c @@ -502,7 +502,7 @@ ip6_frag_do_fragment (vlib_main_t * vm, u32 from_bi, u16 mtu, return IP_FRAG_ERROR_NONE; } -static char *ip4_frag_error_strings[] = { +char *ip4_frag_error_strings[] = { #define _(sym,string) string, foreach_ip_frag_error #undef _ diff --git a/src/vnet/ip/ip_frag.h b/src/vnet/ip/ip_frag.h index 86462e6c7d2..ac562c944a3 100644 --- a/src/vnet/ip/ip_frag.h +++ b/src/vnet/ip/ip_frag.h @@ -76,6 +76,8 @@ typedef enum IP_FRAG_N_ERROR, } ip_frag_error_t; +extern char *ip4_frag_error_strings[]; + void ip_frag_set_vnet_buffer (vlib_buffer_t * b, u16 mtu, u8 next_index, u8 flags); diff --git a/src/vnet/ip/ip_path_mtu_node.c b/src/vnet/ip/ip_path_mtu_node.c index b13f9de849c..33be4bbcae9 100644 --- a/src/vnet/ip/ip_path_mtu_node.c +++ b/src/vnet/ip/ip_path_mtu_node.c @@ -176,7 +176,8 @@ VLIB_REGISTER_NODE (ip4_ip_pmtu_dpo_node) = { .name = "ip4-pmtu-dpo", .vector_size = sizeof (u32), .format_trace = format_ip_pmtu_trace, - .n_errors = 0, + .n_errors = IP_FRAG_N_ERROR, + .error_strings = ip4_frag_error_strings, .n_next_nodes = IP_PMTU_N_NEXT, .next_nodes = { @@ -187,7 +188,8 @@ VLIB_REGISTER_NODE (ip6_ip_pmtu_dpo_node) = { .name = "ip6-pmtu-dpo", .vector_size = sizeof (u32), .format_trace = format_ip_pmtu_trace, - .n_errors = 0, + .n_errors = IP_FRAG_N_ERROR, + .error_strings = ip4_frag_error_strings, .n_next_nodes = IP_PMTU_N_NEXT, .next_nodes = { -- cgit 1.2.3-korg