From owner-freebsd-net@FreeBSD.ORG Sat Dec 4 21:30:31 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DBD516A4CE for ; Sat, 4 Dec 2004 21:30:31 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2A0543D54 for ; Sat, 4 Dec 2004 21:30:30 +0000 (GMT) (envelope-from meno.abels@gmail.com) Received: by wproxy.gmail.com with SMTP id 67so52995wri for ; Sat, 04 Dec 2004 13:30:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=KtHrWJmFS7DB6fvdDF462oLvqtwur+r/pClLiFE7Cb7ygW3MD/tACRbUgBKb/6t30tRL0zhUFSmPwA56Q+OEs5tkjk8Gcamt+xcK1BwOjHC99jpeH4j64II5LEImRnLUReNaCHv9q2tGnJDvTij0TUCE6srZ66U9YkCMxzwIOp0= Received: by 10.54.8.47 with SMTP id 47mr494602wrh; Sat, 04 Dec 2004 13:30:28 -0800 (PST) Received: by 10.54.25.5 with HTTP; Sat, 4 Dec 2004 13:30:20 -0800 (PST) Message-ID: <344de28704120413306b410608@mail.gmail.com> Date: Sat, 4 Dec 2004 22:30:20 +0100 From: Meno Abels To: freebsd-net@freebsd.org In-Reply-To: <344de28704120412333e70fb76@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <344de28704120412333e70fb76@mail.gmail.com> Subject: Re: INADDR_ANY bind in a multiip jail X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: meno.abels@adviser.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Dec 2004 21:30:31 -0000 Hello, i just found a patch from Pawel Jakub Dawidek(mijail5) which do not need the pcb bind to multiple ip's. He solve the problem my marking the socket that is bound to a jail with inaddr_any. With this mark he is filtering the incoming connection lookup to the pcb structure on jail bases. This should enable the behavior that i requested. So that could be a approach to solve the problem with a few sourceline changes. But is it also possible to bind in two jails the same port with inaddr_any? meno On Sat, 4 Dec 2004 21:33:16 +0100, Meno Abels wrote: > Hello, > > i had made a patch for 5_X (kern/69064) jail code which enables ipv6 and > multi ip numbers to a jail. > I currently solved the INADDR_ANY binding to map to the first ip of > the jail. But this is not really the good solution it would be better to bind > to all ip's of the jail. Which are simple to determine the ip number which > are needed. But how i change in_pcbbind to support multiip binds. > The problem is, there is only one pcb which can only bound to one > ip or just INADDR_ANY. But now i need a pcb which is able to bind to > two or more ip's. This is not intended in the current code. But to change > this it will be a huge change in the current datastructures of the kernel > networking part. > I don't like to change so much code at once so i ask you is there any > other clue to solve the INADDR_ANY mapping to a defined number of > ip's. > > thanks in advance > > meno >