On Sun, 26 Oct 2003, Hrvoje Niksic wrote:
> Does anyone think it would be useful to add the ability to specify
> port ranges with `--bind-address'? I received a patch that adds that
> feature by extending the `--bind-address' syntax to allow things like
> `--bind-address=1.2.3.4:704' and `--bind-address=1.2.3.4:700-1000'.
>
> I have no use for this functionality, but I'd like to know if someone
> else might find this useful. Since the patch does require additional
> work to be applied, and since it might interfere with Mauro's IPv6
> work, I'd like to check how useful it is first.
>
> The submitter, Turi Peter, says:
>
> Well, a normal user has nothing to do with this patch, but in a
> few cases, it's required to do operations from the lower ports.
> Here at ELTE I've run into this poblem: I wanted to fetch http(s)
> data form a server, where the connections are allowed only from
> privilegized ports. Messing with netcat and openssl is quite
> messy and I wanted an "elegant" solution, this is why I wrote this
> patch.
>
> What do you think? Mauro, could you comment on this?
i think that the port range restriction is useful and since adding this
functionality to wget is not very difficult (and if correctly done, it
does not break IPv6 support), we should definitely do it.
however, i am not very happy with turi's code, since the parsing of the
--bind-address argument should not be done in resolve_bind_address
but in the getopt loop and it should not use sscanf.
--
Aequam memento rebus in arduis servare mentem...
Mauro Tortonesi [EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Deep Space 6 - IPv6 with Linux http://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it