Date: Thu, 16 Aug 2001 18:00:26 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_jail.c Message-ID: <200108170100.f7H10Qe13248@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
rwatson 2001/08/16 18:00:26 PDT
Modified files: (Branch: RELENG_4)
sys/kern kern_jail.c
Log:
MFC of jail fixes regarding INADDR_LOOPBACK. -CURRENT commit message:
Anton kindly pointed out (and fixed) a bug in the Jail handling of the
bind() call on IPv4 sockets:
Currently, if one tries to bind a socket using INADDR_LOOPBACK inside a
jail, it will fail because prison_ip() does not take this possibility
into account. On the other hand, when one tries to connect(), for
example, to localhost, prison_remote_ip() will silently convert
INADDR_LOOPBACK to the jail's IP address. Therefore, it is desirable to
make bind() to do this implicit conversion as well.
Apart from this, the patch also replaces 0x7f000001 in
prison_remote_ip() to a more correct INADDR_LOOPBACK.
Approved by: re@FreeBSD.org (Murray)
Revision Changes Path
1.6.2.3 +9 -2 src/sys/kern/kern_jail.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108170100.f7H10Qe13248>
