]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
resolv: Remove unnecessary res_isourserver_p call from send_dg
authorFlorian Weimer <fweimer@redhat.com>
Thu, 15 Jul 2021 06:28:51 +0000 (08:28 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 15 Jul 2021 07:00:24 +0000 (09:00 +0200)
As the comment indicates, the check is unnecessary due to the way the
UDP socket is set up.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
resolv/res_send.c

index 9a3bc5804a6510e81feaec947ba4b8189925a70c..a70f3dec051b1163664ed00915a609adf2796331 100644 (file)
@@ -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;
-
                /* Check for the correct header layout and a matching
                   question.  */
                int matching_query = 0; /* Default to no matching query.  */