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/vnet/udp/udp.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/vnet/udp/udp.h') diff --git a/src/vnet/udp/udp.h b/src/vnet/udp/udp.h index dae611cc418..aa37701106c 100644 --- a/src/vnet/udp/udp.h +++ b/src/vnet/udp/udp.h @@ -78,6 +78,7 @@ typedef enum } udp_error_t; #define foreach_udp4_dst_port \ +_ (53, dns) \ _ (67, dhcp_to_server) \ _ (68, dhcp_to_client) \ _ (500, ikev2) \ @@ -91,10 +92,12 @@ _ (4789, vxlan) \ _ (4789, vxlan6) \ _ (4790, VXLAN_GPE) \ _ (6633, vpath_3) \ -_ (6081, geneve) +_ (6081, geneve) \ +_ (53053, dns_reply) #define foreach_udp6_dst_port \ +_ (53, dns6) \ _ (547, dhcpv6_to_server) \ _ (546, dhcpv6_to_client) \ _ (2152, GTPU6) \ @@ -104,7 +107,8 @@ _ (4341, lisp_gpe6) \ _ (4342, lisp_cp6) \ _ (4790, VXLAN6_GPE) \ _ (6633, vpath6_3) \ -_ (6081, geneve6) +_ (6081, geneve6) \ +_ (53053, dns_reply6) typedef enum { -- cgit 1.2.3-korg