linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pointer: connect to 127.x.y.z succeeds
@ 2002-09-19  1:44 Matthias Andree
  0 siblings, 0 replies; only message in thread
From: Matthias Andree @ 2002-09-19  1:44 UTC (permalink / raw)
  To: Linux-Kernel mailing list

There's a slight difference between Linux and FreeBSD. Assume each is
configured so that the loopback device is 127.0.0.1/8. Linux will then
accept a connect to 127.126.125.124, FreeBSD will instead say
EADDRNOTAVAIL:

     "49 EADDRNOTAVAIL Cannot assign requested address.  Normally results
     from an attempt to create a socket with an address not on this
     machine." (FreeBSD 4.7-PRERELEASE errno(2) man page)

While the routing decision seems right with automatic routes, it's
strange that Linux accepts a connection on an IP that is not configured.
Would it be feasible that Linux looks at the destination IP before
accepting a connection on the lo interface?


This may also be related to the issue raised some time ago that Linux
lets you connect to any local IP from any interface by default, so that
eth0 clients can connect to the eth2 IP even when the route is removed.
I believe Felix von Leitner complained about this behaviour.


I'd appreciate documentation pointers on this discussion as I believe
this has been mentioned before, yet I don't recall enough to feed Google
with a decent search.

-- 
Matthias Andree

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-19  1:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-19  1:44 Pointer: connect to 127.x.y.z succeeds Matthias Andree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).