bugGNU Wget - Bugs: bug #33835, don't limit DNS results to 3...

 
 

bug #33835: don't limit DNS results to 3 (src/host.c)

Submitted by:  Noël Köthe <nok>
Submitted on:  Sat 23 Jul 2011 10:44:41 AM UTC  
 
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: Giuseppe Scrivano <gscrivano>
Originator Name: Open/Closed: Closed
Release: 1.12Operating System: GNU/Linux
Reproducibility: NoneFixed Release: None
Planned Release: NoneRegression: None
Work Required: NonePatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 06 Aug 2011 10:38:25 AM UTC, comment #1:

I have introduced a configuration value "showalldnsentries". When it is set to on then all the DNS entries are printed.

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Sat 23 Jul 2011 10:44:41 AM UTC, original submission:

Hello,

a wishlist request http://bugs.debian.org/612450
--8<--
I do not what benefits this brings but wget apperantly only shows only first
3 addresses of given hostname.

# host http://www.debian.org
http://www.debian.org has address 82.195.75.97
http://www.debian.org has address 86.59.118.148
http://www.debian.org has IPv6 address 2001:41b8:202:deb:216:35ff:fec4:6340
http://www.debian.org has IPv6 address 2001:858:2:2:214:22ff:fe0d:7717

# wget http://www.debian.org/
--2011-02-08 16:06:27-- http://www.debian.org/
Resolving http://www.debian.org... 2001:858:2:2:214:22ff:fe0d:7717,
2001:41b8:202:deb:216:35ff:fec4:6340, 82.195.75.97, ...
Connecting to http://www.debian.org|2001:858:2:2:214:22ff:fe0d:7717|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14273 (14K) [text/html]
Saving to: `index.html.1'

100%[==================================================================================================>]
14,273 34.0K/s in 0.4s

2011-02-08 16:06:27 (34.0 KB/s) - `index.html.1' saved [14273/14273]

#

(but as you can see it actually shows ", ...", indiciateing there are some more
ip addresses).

Becasue if host two IP address, it will pring something like:
....
Resolving he.net... 2001:470:0:76::2, 216.218.186.2
....

With no ", ...".

I do not see why it print only 3. More than 3 are rearly seen.
More often in case of IPv6 there would be 2 or 4 actually.
Also even there is more, then this will be extreamly reare, and why not just be
correct and display all for user information.

This can happen confusing to user if for example reconnection will take place.

Or when wget will be restarted again, now showing something different

....
Resolving http://www.debian.org... 2001:858:2:2:214:22ff:fe0d:7717,
2001:41b8:202:deb:216:35ff:fec4:6340, 86.59.118.148, ...
....
compared to previous

....
Resolving http://www.debian.org... 2001:858:2:2:214:22ff:fe0d:7717,
2001:41b8:202:deb:216:35ff:fec4:6340, 82.195.75.97, ...
....

(this all is correct, but not very clear).

Why bother with limits, and possibility of some bugs in more complex code :)
--8<--

the code limits it and maybe you aggree with him that limiting it to 3 has no advantage:

src/host.c
...
/* Print the addresses determined by DNS lookup, but no more than
three. */
if (!silent && !numeric_address)
{
int i;
int printmax = al->count <= 3 ? al->count : 3;
for (i = 0; i < printmax; i++)
{
logputs (LOG_VERBOSE, print_address (al->addresses + i));
if (i < printmax - 1)
logputs (LOG_VERBOSE, ", ");
}
if (printmax != al->count)
logputs (LOG_VERBOSE, ", ...");
logputs (LOG_VERBOSE, "\n");
}
...

Noël Köthe <nok>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gscrivano (Posted a comment)
  • -unavailable- added by nok (Submitted the item)
  • -unavailable- added by nok (Debian BTS)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 06 Aug 2011 10:38:25 AM UTCgscrivanoStatusNone=>Fixed
      Assigned toNone=>gscrivano
      Open/ClosedOpen=>Closed
    Sat 23 Jul 2011 10:44:41 AM UTCnokCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1