From owner-freebsd-net@FreeBSD.ORG Thu Dec 11 13:12:19 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D05271065679 for ; Thu, 11 Dec 2008 13:12:19 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id 635B58FC14 for ; Thu, 11 Dec 2008 13:12:19 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-005-194.pools.arcor-ip.net [88.66.5.194]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis) id 0MKwtQ-1LAlKz2dPk-00010q; Thu, 11 Dec 2008 14:12:17 +0100 Received: (qmail 51615 invoked from network); 11 Dec 2008 13:12:17 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by router.laiers.local with SMTP; 11 Dec 2008 13:12:17 -0000 From: Max Laier Organization: FreeBSD To: freebsd-net@freebsd.org Date: Thu, 11 Dec 2008 14:12:16 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200811201450.30016.max@love2party.net> <24BD4A21-E10D-4E09-8C33-3FCF930A0495@lakerest.net> In-Reply-To: <24BD4A21-E10D-4E09-8C33-3FCF930A0495@lakerest.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812111412.16757.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+8Rb0BzuksPsKU390lT3sqaCh3cGcO1+IUk1o 0fuzwiOtjOjgjcoSfIGxtt9Flmh5khJVGHNNqd8VU+sPrc0TgR /B1RPy60iHCuB0BY3WzDw== Cc: Randall Stewart Subject: Re: Heads up --- Thinking about UDP and tunneling X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 13:12:19 -0000 On Thursday 11 December 2008 13:50:39 Randall Stewart wrote: > All: > > Ok here is what I have come up with.. going along the > lines of Max's suggestion.. its pretty clean I think. > > Comments would be most welcome.. > > The only thing possibly a bit dodgy is that > > 1) UDP has no per-protocol block. > 2) Instead of creating one, I am using the block pointer in the inp > as the function pointer for the tunneling. > > What this means if we EVERY did add a per protocol structure for > UDP we would need to move the function pointer in there.. > > The nice thing it does is make it so we have no structural changes to > the code... i.e. complete compatibility... no changes to inp or > other UDP structures :-) > > > Here is the patch.. please send comments ;-D I like it, though I have no idea what the implications of using the block pointer might be. One thing about the patch: What about the multi-/broadcast cases? I think if we introduce this, we want to make sure it works there as well - no? And finally, is there a potential race with setting the function and data arriving at the socket - should udp_set_kernel_tunneling maybe check that the socket isn't bound yet? -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News