Date: Mon, 29 Dec 2008 10:10:37 +0300 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: Gerry Weaver <gerryw@compvia.com> Cc: freebsd-net@freebsd.org Subject: Re: pfil + if_bridge hooks not being called Message-ID: <PTEt0I6qfmOW7cqoflbu9cfFnOc@kjaK%2B/sQ5DW5981v71UogZJPf/0> In-Reply-To: <20081229015957.4fe4d0ac@mail01.compvia.com> References: <20081229015957.4fe4d0ac@mail01.compvia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Gerry, good day. Sun, Dec 28, 2008 at 07:59:57PM -0600, Gerry Weaver wrote: > I am working on a driver to collect some network statistics using > pfil. I have set up a bridge and set net.link.bridge.pfil_member=1 via > sysctl. I have added hooks for incoming and outgoing packets. I also > put a third adapter into the system for dev/managment purposes. My > hooks are only being called for outgoing packets on the management > (non bridge) interface. A simple check will be to fire up standard hooks (for example, pf firewall + some rules with 'log' keyword, see 'man pf.conf') and watch for the logged packets on a pflog0 interface using tcpdump. If you'll see the packets you wanted to see, then the problem is probably with your code. If not, then probably your setup is incorrect and/or system has a bug. > I have been searching for information about > what I may have overlooked, but I can't find anything concrete. Is > there something else that I need to do to see packets on the bridge > member interfaces and incoming packets in general? You may want to add some diagnostics to the bridge_pfil() in /sys/net/if_bridge.c, rebuild your kernel and try to see how it goes. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?PTEt0I6qfmOW7cqoflbu9cfFnOc>