Multiple ip-numbers in jails (fixed INADDR_ANY behaviour).

Oliver Fromme olli at secnetix.de
Wed Apr 16 06:49:23 PDT 2003


Pawel Jakub Dawidek <nick at garage.freebsd.pl> wrote:
 > On Wed, Apr 16, 2003 at 12:25:11PM +0100, Jan Grant wrote:
 > +> Hang on, so you're saying that if my machine has (say) 4 IP addresses,
 > +> and the jail has two of them, and I've a process listening on INADDR_ANY
 > +> in a non-jail, and one listening on INADDR_ANY in a jail,

That shouldn't be possible at all.  You cannot have multiple
processes listen on the same address and port, no matter
whether they're in a jail or not.

If this patch for multiple IP numbers in jails breaks that
behaviour, then it does not fix INADDR_ANY behaviour, despite
what the subject says.  :-)

 >         # /usr/sbin/sshd -p 666
 >         # jail / temp <yourip> /usr/sbin/sshd -p 666

That last command _must_ fail with errno EADDRINUSE.

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"If you do things right, people won't be sure you've done
anything at all." -- God in Futurama season 4 episode 8


More information about the freebsd-hackers mailing list