From owner-freebsd-net@FreeBSD.ORG Wed Jun 22 12:33:08 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 95E1316A41C for ; Wed, 22 Jun 2005 12:33:08 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D3B143D48 for ; Wed, 22 Jun 2005 12:33:08 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j5MCX8kP091049; Wed, 22 Jun 2005 05:33:08 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j5MCX711091048; Wed, 22 Jun 2005 05:33:07 -0700 (PDT) (envelope-from rizzo) Date: Wed, 22 Jun 2005 05:33:07 -0700 From: Luigi Rizzo To: Ari Suutari Message-ID: <20050622053307.B90964@xorpc.icir.org> References: <42B7B352.8040806@suutari.iki.fi> <20050621170649.B82876@xorpc.icir.org> <42B94023.3090202@suutari.iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <42B94023.3090202@suutari.iki.fi>; from ari@suutari.iki.fi on Wed, Jun 22, 2005 at 01:40:35PM +0300 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 12:33:08 -0000 On Wed, Jun 22, 2005 at 01:40:35PM +0300, Ari Suutari wrote: > 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. yes i think you should reuse the tag, just add a new opcode so that the action is attach the mtag to the mbuf if not there yet (maybe override its content if you believe you could match multiple rules of this type) and then continue processing as in a 'count' action. cheers luigi > 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. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"