From owner-freebsd-hackers Mon Dec 10 18:49:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mars-gw.morning.ru (ns.morning.ru [195.161.98.5]) by hub.freebsd.org (Postfix) with ESMTP id 7BF6437B405; Mon, 10 Dec 2001 18:49:11 -0800 (PST) Received: from NDNM ([195.161.98.250]) by mars-gw.morning.ru (8.11.5/8.11.5) with ESMTP id fBB2mu682382; Tue, 11 Dec 2001 09:48:57 +0700 (KRAT) Date: Tue, 11 Dec 2001 09:53:53 +0700 From: Igor M Podlesny X-Mailer: The Bat! (v1.53d) Business Organization: Morning Network X-Priority: 3 (Normal) Message-ID: <123313439001.20011211095353@morning.ru> To: Terry Lambert Cc: Peter Pentchev , Dima Dorfman , chris@FreeBSD.ORG, Subject: Re[2]: jail.c.patch (allowing to use hostnames when invoking jail(8)) In-Reply-To: <3C14C135.CB9099AD@mindspring.com> References: <20011209205442.C8D0A3E2F@bazooka.trit.org> <3C141F9E.D7681BCC@mindspring.com> <20011210124049.G757@straylight.oblivion.bg> <3C14C135.CB9099AD@mindspring.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Peter Pentchev wrote: >> > This is why the inte_aton() call is still necessary. >> [snip] >> > Please call inet_aton(), and then _only_ if that fails, call the >> > gethostbyname(). >> >> How about inet_pton() and getnameinfo()? > You know, I first thought of this, but then I backed off it. > The problem is that the addres is passed in as a 32 bit int, not > as the address of a sockaddr_in. I think it would take a lot of > work to make the jail code IPv6-safe. You'd have to talk to Poul > for details, but it's pretty clear that the "splitting" of the > virtual address aliases per jail on the interface(s) in question > is very IPv4 specific, right now. > -- Terry There's one thing I can't get... we're talking about to use or not to use just one more system call in an "userland"-program which results to the minimal code size increment and affects nothing else. Look at ipfw.c (userland also) men... That's the place to optimize and re-write everything from scratch. And jail.c is just small wrapper for system call. It doesn't worth all these time we've already spent discussing to call or not to call just one more function. This is my own humble (or not too) opinion. -- Igor mailto:poige@morning.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message