From f282cdbe7f436c75864e5640a409a10485e9abb2 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 24 Jun 2022 18:16:41 +0200 Subject: resolv: Implement no-aaaa stub resolver option Reviewed-by: Carlos O'Donell --- resolv/res_send.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'resolv/res_send.c') diff --git a/resolv/res_send.c b/resolv/res_send.c index d6c85fd7a2..6a08e729a4 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -438,8 +438,13 @@ context_send_common (struct resolv_context *ctx, RES_SET_H_ERRNO (&_res, NETDB_INTERNAL); return -1; } - int result = __res_context_send (ctx, buf, buflen, NULL, 0, ans, anssiz, - NULL, NULL, NULL, NULL, NULL); + + int result; + if (__res_handle_no_aaaa (ctx, buf, buflen, ans, anssiz, &result)) + return result; + + result = __res_context_send (ctx, buf, buflen, NULL, 0, ans, anssiz, + NULL, NULL, NULL, NULL, NULL); __resolv_context_put (ctx); return result; } -- cgit 1.4.1