Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2001 09:53:53 +0700
From:      Igor M Podlesny <poige@morning.ru>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Peter Pentchev <roam@ringlet.net>, Dima Dorfman <dima@trit.org>, chris@FreeBSD.ORG, <freebsd-hackers@FreeBSD.ORG>
Subject:   Re[2]: jail.c.patch (allowing to use hostnames when invoking jail(8))
Message-ID:  <123313439001.20011211095353@morning.ru>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?123313439001.20011211095353>