Ticket UUID: | 3325112 | |||
Title: | ftp -- too enthusiastic use of reverse DNS | |||
Type: | Bug | Version: | None | |
Submitter: | ferrieux | Created on: | 2011-06-23 10:18:34 | |
Subsystem: | ftp | Assigned To: | andreas_kupries | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2011-08-10 03:05:03 | |
Resolution: | Accepted | Closed By: | andreas_kupries | |
Closed on: | 2011-08-09 20:05:03 | |||
Description: |
The calls to [fconfigure -peer/sockname], which incur reverse DNS lookups, are not ideally placed in the code. This matters when the reverse DNS lookup is likely to fail slowly (with a timeout). TYpical are ill-configured resolvers. Especially the lookup on the client's own IP is likely to fail when it's NATted. See https://groups.google.com/group/comp.lang.tcl/browse_frm/thread/65b6637a503f4966?hl=fr# . (1) [fconfigure -peername] is called unconditionally, but uses the result only in the VERBOSE case (!) (2) [fconfigure -sockname] is called unconditionally for the data connection, though it is only useful in active mode. | |||
User Comments: |
andreas_kupries added on 2011-08-10 03:05:03:
allow_comments - 1 Committed to head. ferrieux added on 2011-06-24 05:36:14: File Added - 415805: ftp-nodns.patch ferrieux added on 2011-06-24 05:35:34: The attached patch does two things: (1) completely remove the -peername since it is redundant with the given remote host and port. The behavior is now to always return an IP address instead of a name, but that also happens when rDNS fails, so it's not breaking compat. (2) move the -sockname on control connection, which is needed to get the IP of the proper network interface, inside the part specific to active mode. Thus, passive mode is now DNS-free. ferrieux added on 2011-06-23 23:13:34: OK, will do so asap :} andreas_kupries added on 2011-06-23 23:00:31: Alexandre, if you have patches for these, please attach them. |
Attachments:
- ftp-nodns.patch [download] added by ferrieux on 2011-06-24 05:36:14. [details]