Re: To the bind maintainer
On Wed, Jan 26, 2000 at 09:08:49AM -0500, Elie Rosenblum wrote:
> If you bind to the 'default interface' it means you're just saying
> 'Bind this port for me. I don't care what interface traffic comes in
> on'. It will accept it off any interface, even ones created after the
> bind is done. The program doesn't need to do anything to support this.
IIRC this isn't true, and it will only accept packets from interfaces that
existed at the time of the bind(2) call.
I recall running into this problem when making a perl script to repeatedly
query a dns server until a response comes back, thus convincing diald to
establish a connection. diald is supposed to do this automatically thanks
to the program's own dns queries, but glibc's dns backoff behavior and
diald's timeouts and redial delays could easily interact in undesirable
ways making such a script necessary for reliable network-using cron scripts.
Anyway, i bound with 'default interface' and the script would just query and
query, never noticing when ppp actually came up and the responses started
coming in (and i could see them arrive with tcpdump or modem lights). so i
ended up having to rebind automatically each 5 seconds when another packet
was sent :( and then it worked.
James Deikun, Techie(tm), CSI Multimedia
The opinions expressed &c.