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 8344dfe6c9 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).
2006-08-09 12:42:54 +00:00
..
ssl Autogenerate .vimrc files and put the master in config/vimrc 2006-01-15 18:38:58 +01:00
connection.c It works without this code 2006-07-16 16:00:56 +02:00
connection.h Changes related to Win32 port. S_IRWXG and S_IRWXO were undefined 2006-05-18 21:46:42 +02:00
dns.c Fix IPv4 DNS lookup bug 2006-08-09 12:42:54 +00: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 connect_socket(): simplify code a bit. 2006-01-05 18:36:22 +01:00
socket.h Define EL_PF_INET and EL_PF_INET6 to identify protocol in use instead 2006-01-04 18:06:53 +01:00
state.c Make elinks tcc (tiny C compiler) friendly. 2006-01-21 21:33:23 +01:00
state.h Fix various sparse warnings 2005-11-24 15:38:47 +01:00