diff options
author | tmm <tmm@FreeBSD.org> | 2002-10-26 12:32:07 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2002-10-26 12:32:07 +0000 |
commit | d0b6b7a6ad610aff8360ec54f183190acf3391a4 (patch) | |
tree | 54377b423573ca3733f0c1a3af28c0f20f15998c | |
parent | 9cf397c653a9be7011e7b19229c07d8df4afb032 (diff) | |
download | FreeBSD-src-d0b6b7a6ad610aff8360ec54f183190acf3391a4.zip FreeBSD-src-d0b6b7a6ad610aff8360ec54f183190acf3391a4.tar.gz |
Call bpf_mtap() on outgoing packets.
-rw-r--r-- | sys/dev/gem/if_gem.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index bfabb7f..c702ed6 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -45,6 +45,7 @@ #include <sys/socket.h> #include <sys/sockio.h> +#include <net/bpf.h> #include <net/ethernet.h> #include <net/if.h> #include <net/if_arp.h> @@ -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) { |