[PATCH 17/30] resolv: Remove unnecessary res_isourserver_p call from send_dg
Carlos O'Donell
carlos@redhat.com
Thu Jul 15 05:01:31 GMT 2021
On 7/8/21 11:04 AM, Florian Weimer via Libc-alpha wrote:
> As the comment indicates, the check is unnecessary due to the way the
> UDP socket is set up.
OK for glibc 2.34.
Tested without regression on x86_64 and i686.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
> ---
> resolv/res_send.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/resolv/res_send.c b/resolv/res_send.c
> index 77d6835e1a..b6139c7d62 100644
> --- a/resolv/res_send.c
> +++ b/resolv/res_send.c
> @@ -1343,12 +1343,6 @@ send_dg(res_state statp,
> return close_and_return_error (statp, resplen2);
> }
>
> - /* Paranoia check. Due to the connected UDP socket,
> - the kernel has already filtered invalid addresses
> - for us. */
> - if (!res_ourserver_p(statp, &from))
> - goto wait;
OK.
> -
> /* Check for the correct header layout and a matching
> question. */
> int matching_query = 0; /* Default to no matching query. */
>
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list