summaryrefslogtreecommitdiffstats
path: root/src/plugins/dns/request_node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dns/request_node.c')
-rw-r--r--src/plugins/dns/request_node.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/dns/request_node.c b/src/plugins/dns/request_node.c
index 9179bf8dbdd..9e76a56f961 100644
--- a/src/plugins/dns/request_node.c
+++ b/src/plugins/dns/request_node.c
@@ -208,13 +208,7 @@ 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_dec_len (name0, 1);
t0->request_type = DNS_PEER_PENDING_NAME_TO_IP;
@@ -242,6 +236,11 @@ dns46_request_inline (vlib_main_t * vm,
clib_memcpy_fast (t0->dst_address, ip40->src_address.as_u8,
sizeof (ip4_address_t));
+ /*
+ * vnet_dns_labels_to_name produces a non NULL terminated vector
+ * vnet_dns_resolve_name expects a C-string.
+ */
+ vec_add1 (name0, 0);
vnet_dns_resolve_name (vm, dm, name0, t0, &ep0);
if (ep0)