From owner-svn-src-head@FreeBSD.ORG Tue Oct 7 15:13:44 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 467E751A; Tue, 7 Oct 2014 15:13:44 +0000 (UTC) Received: from mail.fer.hr (mail.fer.hr [161.53.72.233]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.fer.hr", Issuer "TERENA SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE3D9DFD; Tue, 7 Oct 2014 15:13:43 +0000 (UTC) Received: from x23 (31.147.124.153) by MAIL.fer.hr (161.53.72.233) with Microsoft SMTP Server (TLS) id 14.2.342.3; Tue, 7 Oct 2014 17:13:40 +0200 Date: Tue, 7 Oct 2014 17:13:55 +0200 From: Marko Zec To: "Andrey V. Elsukov" Subject: Re: svn commit: r272695 - head/sys/net Message-ID: <20141007171355.6e4da644@x23> In-Reply-To: <5433F5EE.3010006@FreeBSD.org> References: <201410071331.s97DV5hB088377@svn.freebsd.org> <20141007160405.35f52792@x23> <5433F5EE.3010006@FreeBSD.org> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd9.1) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [31.147.124.153] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2014 15:13:44 -0000 On Tue, 7 Oct 2014 18:17:18 +0400 "Andrey V. Elsukov" wrote: > On 07.10.2014 18:04, Marko Zec wrote: > > On Tue, 7 Oct 2014 13:31:05 +0000 > > "Andrey V. Elsukov" wrote: > > > >> Author: ae > >> Date: Tue Oct 7 13:31:04 2014 > >> New Revision: 272695 > >> URL: https://svnweb.freebsd.org/changeset/base/272695 > >> > >> Log: > >> Our packet filters use mbuf's rcvif pointer to determine incoming > >> interface. Change mbuf's rcvif to enc0 and restore it after pfil > >> processing. > > > > Will this work / was this tested with options VIMAGE, where > > m_pkthdr.rcvif->if_vnet will no longer match curvnet, except in > > vnet0? > > I tested only without VIMAGE. ipfw and pf use if_xname field to > compare interfaces. So will this work? I have no idea whether this would work now, but this change implies that no pfil consumer should reference m_pkthdr.rcvif->if_vnet from now on, ever. Which doesn't seem right to me. If changing m_pkthdr.rcvif to enc0 in ipsec_filter() is really unavoidable, perhaps we could introduce enc0 for each vnet, maybe in a similar manner how hrs@ virtualized gif (271917) and gre (271918) cloners, which (gif) apparently seem to be at the root of the PR 110959 referenced here. Marko