1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00
elinks/src/network
Miciah Dashiel Butler Masters 4895620e09 Fix IPv4 DNS lookup bug
In revision 1.15 of dns.c (as it was called way back then), pasky
backported a fix from Links 0.97pre2 to try gethostbyaddr before
trying gethostbyname for DNS lookups:

   MacOS address resolution fix (Aldy Hernandez) (from 0.97pre2)

However, that fix introduced a bug, because it was calling gethostbyaddr
on all addresses, not just IP addresses. Mikulas fixed that bug in Links
0.98:

   Do not call gethostbyaddr when name is not ip address (it should avoid
   some useless nameserver queries)'

This fix was never backported to ELinks. Until today.

This commit is functionally the same as the fix in Links 0.98, plus it uses
inet_aton for great correctness!

This fixes a bug reported in #elinks by tnks, whereby lookups for
yubnub.org resulted in 121.117.98.110 == 0x7975626E == 'y', 'u', 'b', 'n'.
I believe that it also fixes bug 691 (which is already closed with a
workaround).

[ From commit 8344dfe6c9 in ELinks
  0.12.GIT.  --KON ]
2007-05-01 23:56:08 +03:00
..
ssl Bug 712, ssl_set_no_tls: Disable TLS protocols for GnuTLS too. 2007-05-01 12:45:26 +03:00
connection.c Use enum connection_state 2006-11-27 17:04:43 +01:00
connection.h Make elinks tcc (tiny C compiler) friendly. 2006-01-29 11:28:05 +01:00
dns.c Fix IPv4 DNS lookup bug 2007-05-01 23:56:08 +03:00
dns.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
Makefile path_to_top -> top_builddir 2005-10-20 04:00:35 +02:00
progress.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
progress.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
socket.c Revert 2d6840b9, "Only set the socket protocol family on success." 2007-05-01 14:43:05 +03:00
socket.h Define EL_PF_INET and EL_PF_INET6 to identify protocol in use instead 2006-01-10 15:47:10 +01:00
state.c Fix crashes with various bogus BitTorrent URLs 2007-04-09 10:08:50 +03:00
state.h Fix crashes with various bogus BitTorrent URLs 2007-04-09 10:08:50 +03:00