HomeFreeBSD

if_tuntap: trigger the bpf hook on transmitting for the tap interface

Description

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
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D42467

(cherry picked from commit 35af22ac986c4f3e8160c943a478492e748b6f23)

Details

Provenance
tuexenAuthored on Nov 5 2023, 7:32 PM
Reviewer
kevans
Differential Revision
D42467: if_tuntap: trigger the bpf hook on transmitting for the tap interface
Parents
rGe71e4d9ef1ba: if_tuntap: improve code consistency
Branches
Unknown
Tags
Unknown