]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
if_tuntap: trigger the bpf hook on transmitting for the tap interface
authorMichael Tuexen <tuexen@FreeBSD.org>
Sun, 5 Nov 2023 19:32:46 +0000 (20:32 +0100)
committerMichael Tuexen <tuexen@FreeBSD.org>
Sun, 5 Nov 2023 19:32:46 +0000 (20:32 +0100)
commit35af22ac986c4f3e8160c943a478492e748b6f23
treef3bfd069941af8aaad9d6aa3a8b1b92ad21db3fd
parent03c3a70abe5e9fa259b954de78ae69229fa9c99f
if_tuntap: trigger the bpf hook on transmitting for the tap interface

The tun interface triggers the bpf hook when a packet is transmitted,
the tap interface triggers it when the packet is read from the
character device. This is inconsistent.
So fix the tap device such that it behaves like the tun device.
This is needed for adding support for the tap device to packetdrill.

Reviewed by: kevans, rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D42467
sys/net/if_tuntap.c