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

 
 

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

Submitter:  Noël Köthe <nok>
Submitted:  Sat 23 Jul 2011 10:44:41 AM UTC
   
 
Category:  Feature Request Severity:  3 - Normal
Priority:  5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  gscrivano
Originator Name:  Open/Closed:  Closed
Release:  1.12 Operating System:  GNU/Linux
Reproducibility:  None Fixed Release:  None
Planned Release:  None Regression:  None
Work Required:  None Patch Included:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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 www.debian.org
www.debian.org has address 82.195.75.97
www.debian.org has address 86.59.118.148
www.debian.org has IPv6 address 2001:41b8:202:deb:216:35ff:fec4:6340
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 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 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 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 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-08-06 gscrivano StatusNone Fixed
        Assigned toNone gscrivano
        Open/ClosedOpen Closed
    2011-07-23 nok Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code