Date: Sat, 6 Oct 2012 10:59:44 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Ermal Lu?i <eri@FreeBSD.org> Cc: net@FreeBSD.org Subject: Re: [PATCH] resolve byte order mess in ip_input/ip_output/pfil(9) Message-ID: <20121006065944.GW34622@glebius.int.ru> In-Reply-To: <CAPBZQG2PSNK_YmwpKDue_ZorNRXW0Zag2LW=p%2BOAk08nopy7LQ@mail.gmail.com> References: <20121005114716.GP34622@FreeBSD.org> <CAPBZQG0Z0Hc-DCQoyZGEwLMXB4wSsEZhyoy9zNDuXe8P8LBoQA@mail.gmail.com> <20121005131228.GQ34622@glebius.int.ru> <CAPBZQG2PSNK_YmwpKDue_ZorNRXW0Zag2LW=p%2BOAk08nopy7LQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 05, 2012 at 05:05:16PM +0200, Ermal Lu?i wrote: E> > E> speaking of pf(4) side of things please do not loose the VIMAGE calls! E> > E> > Yeah, can you explain please why do we need them here? The pfil hooks E> > are always run already in some defined VNET context, don't they? E> E> from my testing at the time these were needed otherwise you will get issues. E> I do not remember the details but i put those there because were required. E> There is no overhead as well from leaving those there. Well, Bjoern and Marko are silent. Let's look ourselves. The most generic case is Ethernet interfaces, and yes, ether_input_internal() sets VNET context. Then packet is demuxed to IP level, ip_input() calls pfil(9) hooks and that all is in defined context. If you remember some issues w/o CURVNET in pf_check_*(), then probably you were using some kind of interface (may be some tunneling) that didn't set VNET context. In this case this is bug in the code of this interface, and not in pf. I will remove CURVNET_SET/RESTORE in a separate commit, not related to byte ordering. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121006065944.GW34622>