1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00
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
..
2006-07-16 16:00:56 +02:00
2006-08-09 12:42:54 +00:00
2005-10-20 04:00:35 +02:00
2005-10-21 09:14:07 +02:00
2005-11-24 15:38:47 +01:00