From owner-freebsd-pf@FreeBSD.ORG Tue Jun 11 12:50:37 2013 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4ECA6D5D; Tue, 11 Jun 2013 12:50:37 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-qe0-f53.google.com (mail-qe0-f53.google.com [209.85.128.53]) by mx1.freebsd.org (Postfix) with ESMTP id 02D9F1125; Tue, 11 Jun 2013 12:50:36 +0000 (UTC) Received: by mail-qe0-f53.google.com with SMTP id 1so4794932qee.12 for ; Tue, 11 Jun 2013 05:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=7iP8K+LxC/tZDkrNaIw8LVNdw1zJ/jDuZRPx28Y4Y1U=; b=gGa3nP9o8QLPTRoBFM5Brp9NQbKH0TCOybdJCG3aUHN0TLCOxJrkwWAyULORgsFcrL nnHC8po7nqRKHeZ6pE2VK1E6DQyoY3A65EHDpPBdqMb/onheXbjlOWMR7vsMbxOHAU7A TjPH4wdTWeeY/3YdBwI2V+w9MOfmxXyMBS0YHjrVu4sls/w2j68v40RqFb+2gOTfH2+4 4CDxBG40j9YHtXEkUlRPHucqEum19RqwgduA9BcM7VCj2u0BasCLy/hDyvFf2fFnJm4r 8TMDaahlTxnCVRJZZJ7mf6YPj1g4y2Mr8JMM2zJNZPUmntdhqXdXnpofBVfPRsg+Yupf S63Q== MIME-Version: 1.0 X-Received: by 10.224.87.130 with SMTP id w2mr464275qal.53.1370955036034; Tue, 11 Jun 2013 05:50:36 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.49.51.8 with HTTP; Tue, 11 Jun 2013 05:50:35 -0700 (PDT) In-Reply-To: <20130610140117.GA98967@onelab2.iet.unipi.it> References: <20130610140117.GA98967@onelab2.iet.unipi.it> Date: Tue, 11 Jun 2013 14:50:35 +0200 X-Google-Sender-Auth: MNUVteXUczx9xeo_cW4JWgnF_0w Message-ID: Subject: Re: [PATCH] dummynet(4) patch for pf(4) From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net , "freebsd-pf@freebsd.org" X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jun 2013 12:50:37 -0000 Hello, i made the corrections to the patch to make it more readble. Can some other eyes give a look and say if that have anything against it. Patch is at same location. On Mon, Jun 10, 2013 at 4:01 PM, Luigi Rizzo wrote: > On Mon, Jun 10, 2013 at 03:45:01PM +0200, Ermal Lu?i wrote: > > Hello, > > > > the patch at location [1] implements support for dummynet into pf(4). > > > > The patch has been tested and confirmed working without issues into > pfSense. > > > > Any objections to integrating this into FreeBSD? > > for the dummynet/ipfw part i have no objection -- this is only > a one-line change to sys/netpfil/ipfw/ip_dn_io.c > > For the pf part sys/netpfil/pf/pf.c, there are two huge macros > PACKET_UNDO_NAT() and PACKET_REDO_NAT() which really look ugly. > It would really make sense to change them into functions > (they already do some substantial work so the saving of one > function call is negligible). > > There is also some questionable indentation see the calls to > m_copyback() in PACKET_REDO_NAT() > Some extra braces around if/else blocks would help immensely. > > cheers > luigi > > > [1] > > > https://github.com/pfsense/pfsense-tools/blob/master/patches/RELENG_10_0/dummynet.RELENG_10.diff > > > > -- > > Ermal > > _______________________________________________ > > 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" > -- Ermal