bugGNU Wget - Bugs: bug #21358, Specify a range of ports for Wget...

 
 

bug #21358: Specify a range of ports for Wget to bind to

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Wed 17 Oct 2007 08:18:55 PM UTC  
 
Category: Feature RequestSeverity: 1 - Wish
Priority: 1 - LaterStatus: Confirmed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Release: NoneOperating System: None
Reproducibility: NoneFixed Release: None
Planned Release: 1.15Regression: None
Work Required: 0 - HoursPatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 19 Oct 2007 02:03:41 AM UTC, comment #1:

As Tony Godshall points out in response to the 8k bit-array idea, we could just use a pseudo-random number generator with a sufficiently long period:

http://www.mail-archive.com/wget%40sunsite.dk/msg10460.html

We'd just need to be careful in seeding it.

http://www.mail-archive.com/wget%40sunsite.dk/msg10464.html

Micah Cowan <micahcowan>
Wed 17 Oct 2007 08:18:55 PM UTC, original submission:

My response to a message on-list:

Oleg Ace wrote:

> > Greetings,
> >
> > Was the feature being discussed here
> > http://www.mail-archive.com/wget@sunsite.dk/msg05546.html
> > and here
> > http://www.mail-archive.com/wget@sunsite.dk/msg05577.html
> > ever get implemented?
> >
> > In other words, is it possible to do:
> > wget --bind-address=1.2.3.4:2000-3000 http://...
> >
> >>From trying it out and looking briefly at the code, it would appear it
> > is not, but wanted to make sure.
> >
> > If that is the case, does anyone still have the old patch available,
> > or has a similar new one?


Looking at the threads you indicated, it appears that people were
generally happy to include the feature, but were unhappy with the
specific implementation from the patch:

* parsing of --bind-address belongs in the getopt loop
* sscanf() should be avoided for use in the parsing.
* the ports should be chosen from that range at random, rather than
sequentially, to address an issue pointed out by the Sockets FAQ.

The third point above introduces its own problems: how many bind()
attempts should we make before throwing in the towel? Or should we
attempt every port in that range, keeping an 8k array of bits to track
which ports we've tried already?

Clearly, whatever approach we take will be vastly less
efficient/intelligent than the way the OS picks a port for us, and we'll
need to point these limitations out in the documentation.

I'm not going to write the code for this (at least not any time soon);
if someone is interested enough to rewrite the patch to address these
shortcomings, though, I'll be happy to include it, seeing as how it
apparently met with Hrvoje's and Mauro's approval (and I see how it
could be useful as well; though of course its primary use is probably to
get around broken environments).

I will submit a low-pri issue for it, in the meantime, in case someone
sees it and wants to pick it up. :)

Micah Cowan <micahcowan>

 

(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 micahcowan (Submitted the item)
  •  

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

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 23 Feb 2009 08:48:52 PM UTCmicahcowanSummarySpecify ports for Wget to bind to=>Specify a range of ports for Wget to bind to
    Wed 17 Oct 2007 08:19:39 PM UTCmicahcowanPriority5 - Normal=>1 - Later

    Back to the top


    Powered by Savane 3.1-cleanup1