From owner-svn-src-user@FreeBSD.ORG Tue Jan 5 18:39:21 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76FA4106566C; Tue, 5 Jan 2010 18:39:21 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 6B9C98FC15; Tue, 5 Jan 2010 18:39:20 +0000 (UTC) Received: by ewy26 with SMTP id 26so14563740ewy.3 for ; Tue, 05 Jan 2010 10:39:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=NvjJk014aARMrAeQhMeDJRSUU00wol6Pgf4FnLXl7yI=; b=TWAI8IszYzMCnAwOMzpQeMCwabMRJL/bRuR/pS2/bYb5MeoMu0sECD9cZNxhpcSmbz Aya81QMbB87y/HeSSpnVBvP6WGZ5GKV+eTbIHrRzgUsgqtp0BjWHRUXDYmE1HkyZEfSN hqThnCF0/Ei6keLVYygR5Q2w2zldPxVuhOvv4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=aEISDjKxPl8y24jH1D9FlWh2xxVW7ahvgoVH7TWdeMgHlpYvWStqv8eaDzx0CHdCqp oJ2+28+SG+yuStG6CsdIOxFMIq28GLl3ebbaPOSQCphOGaKO8pU32WjB2srcwGMyP3fU UvzBgTlT25J+vKBkkXzsyQgKkjwfkrX08Mlpk= MIME-Version: 1.0 Sender: ermal.luci@gmail.com Received: by 10.216.85.14 with SMTP id t14mr330044wee.222.1262716752906; Tue, 05 Jan 2010 10:39:12 -0800 (PST) In-Reply-To: <20100105182643.GA93051@onelab2.iet.unipi.it> References: <201001041658.o04GwFfG023749@svn.freebsd.org> <9a542da31001051006r61af058eg715c29ef0d3d2020@mail.gmail.com> <20100105182643.GA93051@onelab2.iet.unipi.it> From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= Date: Tue, 5 Jan 2010 19:38:51 +0100 X-Google-Sender-Auth: e7c12a555a366916 Message-ID: <9a542da31001051038t9f253fbo79241b11dbba9100@mail.gmail.com> To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: =?ISO-8859-1?Q?Ermal_Lu=E7i?= , Luigi Rizzo , src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r201517 - in user/luigi/ipfw3-head/sys/netinet: . ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 18:39:21 -0000 On Tue, Jan 5, 2010 at 7:26 PM, Luigi Rizzo wrote: > On Tue, Jan 05, 2010 at 07:06:51PM +0100, Ermal Lu?i wrote: > > On Mon, Jan 4, 2010 at 5:58 PM, Luigi Rizzo wrote: > > > > > Author: luigi > > > Date: Mon Jan 4 16:58:15 2010 > > > New Revision: 201517 > > > URL: http://svn.freebsd.org/changeset/base/201517 > > > > > > Log: > > > divert has no specific API so we don't really need an ip_divert.h > > > > > > > > > DECLARE_MODULE(ipdivert, ipdivertmod, SI_SUB_PROTO_IFATTACHDOMAIN, > > > SI_ORDER_ANY); > > > -MODULE_DEPEND(dummynet, ipfw, 2, 2, 2); > > > +MODULE_DEPEND(ipdivert, ipfw, 2, 2, 2); > > > MODULE_VERSION(ipdivert, 1); > > > > > > > I would suggest to remove the dependency altogether since divert(4) does > > not really depend on ipfw(4). Furthermore, the newest pf(4) can work > > together with divert(4) so the it will have more than one consumer in the > > tree. > > I was not aware of pf support -- in fact, i wonder how divert could work > without ipfw because the function pointer ip_divert_ptr at the moment > is defined in ip_fw_pfil.c . > > There are in fact, I believe, two things that enforce the dependency: > 1. the ip_divert_ptr above. We should move it elsewhere, in the > standard ip_* files; > > 2. the tag that is attached to the packet to record the reinject cookie > (I have recently redefined it as MTAG_IPFW_RULE because i was > not aware of the pf(4) support -- i need to revert/fix this if > we want divert and pf cooperation (though note that I tried to > have the same mtag format for all reinjected packets -- dummynet, > divert, netgraph, ... so once we fix it for one application it > should work for all with no special code). > > cheers > luigi > Check it out here http://svn.freebsd.org/viewvc/base/user/eri/pf45/head/ The divert support with the pointer moving is commit 198045 for checking on how i have done in that branch. If you find a better solution go ahead and i will update the referenced pf branch as well. -- Ermal