diff options
author | Benoît Ganne <bganne@cisco.com> | 2023-01-26 16:03:55 +0100 |
---|---|---|
committer | Benoît Ganne <bganne@cisco.com> | 2023-01-26 19:31:51 +0100 |
commit | 16daaaacd12443f5d578f83cb835c68aec89822f (patch) | |
tree | bbf0684c86a30ce5d53551cedcb12c2643d27f09 /src/plugins/dns/request_node.c | |
parent | 4fe09e9f297985e3f452f7722c138d393e8533af (diff) |
dns: keep AddressSanitizer happy
Type: fix
Change-Id: I0ae4071ee317f38daa882fec17087a55afe75d1d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/dns/request_node.c')
-rw-r--r-- | src/plugins/dns/request_node.c | 11 |
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) |