summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-05-23 12:38:22 -0400
committerDamjan Marion <dmarion@me.com>2019-05-24 08:23:15 +0000
commit34716fae918750e4fc7a7da4b06e0dfbdef2d1c5 (patch)
tree1dafbf3146545bf0b72663f665c758440083e843 /src/vnet
parenta40776c76c28d241dff42c2155e7b91fc021858c (diff)
Remove historical ip4 icmp OAM code
Add a registration overwritten warning to ip4_icmp_register_type(...) Change-Id: I6c2aabdb979b54ec49e827225acc74559ac4caab Signed-off-by: Dave Barach <dave@barachs.net>
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 *