From owner-cvs-all Thu Aug 16 18: 0:31 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F146E37B403; Thu, 16 Aug 2001 18:00:26 -0700 (PDT) (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7H10Qe13248; Thu, 16 Aug 2001 18:00:26 -0700 (PDT) (envelope-from rwatson) Message-Id: <200108170100.f7H10Qe13248@freefall.freebsd.org> From: Robert Watson Date: Thu, 16 Aug 2001 18:00:26 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_jail.c X-FreeBSD-CVS-Branch: RELENG_4 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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