From owner-freebsd-net@FreeBSD.ORG Wed Jun 22 10:40:53 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 7747F16A41F for ; Wed, 22 Jun 2005 10:40:53 +0000 (GMT) (envelope-from ari@suutari.iki.fi) Received: from espresso2.syncrontech.com (sync-old.syncrontech.com [213.28.98.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBF8D43D55 for ; Wed, 22 Jun 2005 10:40:49 +0000 (GMT) (envelope-from ari@suutari.iki.fi) Received: from guinness.syncrontech.com (guinness.syncrontech.com [62.71.8.57]) by espresso2.syncrontech.com (8.12.11/8.12.11) with ESMTP id j5MAelJs002645; Wed, 22 Jun 2005 13:40:48 +0300 (EEST) (envelope-from ari@suutari.iki.fi) Received: from [62.71.8.37] (coffee.syncrontech.com [62.71.8.37]) by guinness.syncrontech.com (8.12.11/8.12.11) with ESMTP id j5MAefNO027967; Wed, 22 Jun 2005 13:40:42 +0300 (EEST) (envelope-from ari@suutari.iki.fi) Message-ID: <42B94023.3090202@suutari.iki.fi> Date: Wed, 22 Jun 2005 13:40:35 +0300 From: Ari Suutari User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Luigi Rizzo References: <42B7B352.8040806@suutari.iki.fi> <20050621170649.B82876@xorpc.icir.org> In-Reply-To: <20050621170649.B82876@xorpc.icir.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Policy routing idea (Was: ipfw: Would it be possible to continue processing rest of rules after match ?) 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: Wed, 22 Jun 2005 10:40:53 -0000 Hi, Luigi Rizzo wrote: > i suggest to implement a new action 'setnexthop' which stores the > next hop as an MTAG with the packet (so it is preserved if the > packet gets passed to dummynet). I took a quick look at how ipfw forward has been implemented. It seems to use PACKET_TAG_IPFORWARD to store routing info. If I would implement "ipfw setnexthop" with a new MTAG it would duplicate very much code already present for PACKET_TAG_IPFORWARD. If I could reuse the same MTAG this would be easier to add, all that would be needed is a new opcode for ipfw (or am I missing something important ?) Ari S.