> I read that manpage multiple times, trying to figure out what exactly
> happens when. It states that specifying INADDR_ANY is equivalent to
not
> calling bind() at all before connect(). However if you read closely,
it
> does not state the semantics of such situation for "active" sockets
> (i.e. sockets you call connect() on, as opposed to sockets on which
you
> call listen()/accept()).
> 
> In fact I could not find any documentation on such behaviour on the
> internet, so I read the Linux source code. The description in the
> footnote of my initial email in this thread is my interpretation of
> what
> happens (which matches experiments I made).

Ok, I was not aware of that.

> > What application are we talking about?
> 
> Oh, just about anything that does: socket(); connect(); (without a
> bind() in between), for example default usage of wget, telnet, ssh..
> any
> TCP client really.

If you have a server using several IP addresses, the client IP address
used by tcp client is undefined.

But what application depends on the client IP used?

Anyways, usually you can specify the bind address:

wget: --bind-address=ADDRESS 
telnet: -b address

- Dietmar


_______________________________________________
Users mailing list
[email protected]
https://openvz.org/mailman/listinfo/users

Reply via email to