aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ip/icmp4.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/ip/icmp4.c b/src/vnet/ip/icmp4.c
index 4ca108c63da..1cf6a93be50 100644
--- a/src/vnet/ip/icmp4.c
+++ b/src/vnet/ip/icmp4.c
@@ -737,10 +737,17 @@ void
ip4_icmp_register_type (vlib_main_t * vm, icmp4_type_t type, u32 node_index)
{
icmp4_main_t *im = &icmp4_main;
+ u32 old_next_index;
ASSERT ((int) type < ARRAY_LEN (im->ip4_input_next_index_by_type));
+ old_next_index = im->ip4_input_next_index_by_type[type];
+
im->ip4_input_next_index_by_type[type]
= vlib_node_add_next (vm, ip4_icmp_input_node.index, node_index);
+
+ if (old_next_index &&
+ (old_next_index != im->ip4_input_next_index_by_type[type]))
+ clib_warning ("WARNING: changed next_by_type[%d]", (int) type);
}
static clib_error_t *