From 08e0fdeb392eaf35f554dcfaed15a97da66dde02 Mon Sep 17 00:00:00 2001 From: Thomas Moestl Date: Sat, 26 Oct 2002 12:32:07 +0000 Subject: [PATCH] Call bpf_mtap() on outgoing packets. --- sys/dev/gem/if_gem.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index bfabb7ffe4a..c702ed6ae3c 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -45,6 +45,7 @@ #include #include +#include #include #include #include @@ -1224,12 +1225,14 @@ gem_start(ifp) break; } - if (m != NULL) - m_freem(m0); - /* * WE ARE NOW COMMITTED TO TRANSMITTING THE PACKET. */ + if (ifp->if_bpf != NULL) + bpf_mtap(ifp, m0); + + if (m != NULL) + m_freem(m0); #ifdef GEM_DEBUG if (ifp->if_flags & IFF_DEBUG) {