Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Dec 2008 19:59:57 -0600
From:      "Gerry Weaver" <gerryw@compvia.com>
To:        freebsd-net@freebsd.org
Subject:   pfil + if_bridge hooks not being called
Message-ID:  <20081229015957.4fe4d0ac@mail01.compvia.com>

next in thread | raw e-mail | index | archive | help
Hello All,

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=5Fmember=3D1 via sysctl. I have ad=
ded hooks for=20
incoming and outgoing packets. I also put a third adapter into the syste=
m for=20
dev/managment purposes. My hooks are only being called for outgoing pack=
ets
on the management (non bridge) interface. I have been searching for info=
rmation
about what I may have overlooked, but I can't find anything concrete. Is=
 there=20
something else that I need to do to see packets on the bridge member int=
erfaces
and incoming packets in general=3F=20


I'm using FreeBSD 7.0-RELEASE.

struct pfil=5Fhead *pfh=5Finet;

  pfh=5Finet =3D pfil=5Fhead=5Fget(PFIL=5FTYPE=5FAF, AF=5FINET);

  if(pfh=5Finet =3D=3D NULL)
  {
   uprintf("ERROR: Cannot get pfil head\n");
   return ENOENT;
  }

  pfil=5Fadd=5Fhook(packets=5Fin, NULL, PFIL=5FIN | PFIL=5FWAITOK, pfh=
=5Finet);
  pfil=5Fadd=5Fhook(packets=5Fout, NULL, PFIL=5FOUT | PFIL=5FWAITOK, pfh=
=5Finet);

  ...


Thanks in advance,
Gerry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081229015957.4fe4d0ac>