From owner-freebsd-pf@FreeBSD.ORG Tue Sep 5 04:00:42 2006 Return-Path: X-Original-To: freebsd-pf@hub.freebsd.org Delivered-To: freebsd-pf@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA86916A4DA for ; Tue, 5 Sep 2006 04:00:42 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A480343D45 for ; Tue, 5 Sep 2006 04:00:42 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8540gAT095897 for ; Tue, 5 Sep 2006 04:00:42 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8540gqj095896; Tue, 5 Sep 2006 04:00:42 GMT (envelope-from gnats) Date: Tue, 5 Sep 2006 04:00:42 GMT Message-Id: <200609050400.k8540gqj095896@freefall.freebsd.org> To: freebsd-pf@FreeBSD.org From: SUZUKI Shinsuke Cc: Subject: Re: kern/102647: Using pf stateful rules for inet6 fails for connections originating from the firewall itself to a service running on thesame box X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: SUZUKI Shinsuke 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, 05 Sep 2006 04:00:43 -0000 The following reply was made to PR kern/102647; it has been noted by GNATS. From: SUZUKI Shinsuke To: max@love2party.net Cc: freebsd-pf@freebsd.org, suz@freebsd.org, steinex@nognu.de, freebsd-gnats-submit@freebsd.org Subject: Re: kern/102647: Using pf stateful rules for inet6 fails for connections originating from the firewall itself to a service running on thesame box Date: Tue, 05 Sep 2006 12:53:26 +0900 Hi, >>>>> On Fri, 1 Sep 2006 21:22:45 +0200 >>>>> max@love2party.net(Max Laier) said: > Thinking about this for a bit we might want to use the patch below > instead. i.e. do the fixup locally in the pfil wrapper instead. This > way other filters don't break if they have adapted to the new world > order. > > Thoughts? Please test and report back, either way. I'm fine with your patch. (it is preferable to add a comment about this hack, though) After the PR originator confirmed the fix, could you please commit it? Thanks, ---- SUZUKI, Shinsuke @ KAME Project > Index: pf_ioctl.c > =================================================================== > RCS file: /usr/store/mlaier/fcvs/src/sys/contrib/pf/net/pf_ioctl.c,v > retrieving revision 1.25 > diff -u -r1.25 pf_ioctl.c > --- pf_ioctl.c 21 Jul 2006 09:48:13 -0000 1.25 > +++ pf_ioctl.c 1 Sep 2006 19:19:49 -0000 > @@ -3442,7 +3442,8 @@ > */ > int chk; > > - chk = pf_test6(PF_IN, ifp, m, NULL, inp); > + chk = pf_test6(PF_IN, (*m)->m_flags & M_LOOP ? &loif[0] : ifp, m, > + NULL, inp); > if (chk && *m) { > m_freem(*m); > *m = NULL;