From 6545716c073c88ad86458620c6dbc59ba1cd00bb Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 10 Oct 2017 17:53:14 -0400 Subject: VPP-1027: DNS name resolver This patch is a plausible first-cut, suitable for initial testing by vcl (host stack client library). Main features; - recursive name resolution - multiple ip4/ip6 name servers - cache size limit enforcement - currently limited to 65K - ttl / aging - static mapping support - show / clear / debug CLI commands Binary APIs provided for the following: - add/delete name servers - enable/disable the name cache - resolve a name To Do list: - Respond to ip4/ip6 client DNS requests (vs. binary API requests) - Perf / scale tuning - map pending transaction ids to pool indices, so the cache can (greatly) exceed 65K entries - Security improvements - Use unpredictable dns transaction IDs, related to previous item - Make sure that response-packet src ip addresses match the server - Add binary APIs - deliver raw response data to clients - control recursive name resolution - Documentation Change-Id: I48c373d5c05d7108ccd814d4055caf8c75ca10b7 Signed-off-by: Dave Barach --- src/vlibapi/api_shared.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/vlibapi') diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c index 1bb50d43def..4d11b519cf2 100644 --- a/src/vlibapi/api_shared.c +++ b/src/vlibapi/api_shared.c @@ -665,7 +665,22 @@ vl_msg_api_config (vl_msg_api_msg_config_t * c) { api_main_t *am = &api_main; - ASSERT (c->id > 0); + /* + * This happens during the java core tests if the message + * dictionary is missing newly added xxx_reply_t messages. + * Should never happen, but since I shot myself in the foot once + * this way, I thought I'd make it easy to debug if I ever do + * it again... (;-)... + */ + if (c->id == 0) + { + if (c->name) + clib_warning ("Trying to register %s with a NULL msg id!", c->name); + else + clib_warning ("Trying to register a NULL msg with a NULL msg id!"); + clib_warning ("Did you forget to call setup_message_id_table?"); + return; + } #define _(a) vec_validate (am->a, c->id); foreach_msg_api_vector; -- cgit 1.2.3-korg