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>
diff --git a/src/vnet/dns/request_node.c b/src/vnet/dns/request_node.c
index f7446cc..b91d299 100644
--- a/src/vnet/dns/request_node.c
+++ b/src/vnet/dns/request_node.c
@@ -208,7 +208,13 @@
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;