aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dns/request_node.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-01-09 17:00:00 -0500
committerDamjan Marion <dmarion.lists@gmail.com>2018-01-10 02:43:07 +0000
commit580eda7067bee891c00f59fe3927720def3837ec (patch)
treecf62ee4dd55c6c61adcff15917ab23059f02b17c /src/vnet/dns/request_node.c
parentaec8f8984771cabc79a8ed64f56afcf61465d00a (diff)
Functional improvements, bug fixes
At least when testing against "known good" DNS servers: it turns out that sending 2x requests - one for an A-record and another for a AAAA-record - seems to work better than sending a single DNS_TYPE_ALL request. Fix c-string vs. u8 vector mistakes. Fix server failover. Change-Id: I26554f0a9c1744376f21372506ebec8658e351e2 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/dns/request_node.c')
-rw-r--r--src/vnet/dns/request_node.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/dns/request_node.c b/src/vnet/dns/request_node.c
index f7446cce825..b91d2997dfb 100644
--- a/src/vnet/dns/request_node.c
+++ b/src/vnet/dns/request_node.c
@@ -208,7 +208,13 @@ dns46_request_inline (vlib_main_t * vm,
label0 = (u8 *) (d0 + 1);
+ /*
+ * vnet_dns_labels_to_name produces a non NULL terminated vector
+ * vnet_dns_resolve_name expects a C-string.
+ */
name0 = vnet_dns_labels_to_name (label0, (u8 *) d0, (u8 **) & q0);
+ vec_add1 (name0, 0);
+ _vec_len (name0) -= 1;
t0->request_type = DNS_PEER_PENDING_NAME_TO_IP;