diff mbox series

[17/30] resolv: Remove unnecessary res_isourserver_p call from send_dg

Message ID 77acbd3d188de737f5b13df002bc511f4a676b92.1625251245.git.fweimer@redhat.com
State New
Headers show
Series Move nss_dns into libc | expand

Commit Message

Florian Weimer July 2, 2021, 6:49 p.m. UTC
As the comment indicates, the check is unnecessary due to the way the
UDP socket is set up.
---
 resolv/res_send.c | 6 ------
 1 file changed, 6 deletions(-)
diff mbox series

Patch

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;
-
 		/* Check for the correct header layout and a matching
 		   question.  */
 		int matching_query = 0; /* Default to no matching query.  */