-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ifnet: Detach BPF descriptors on interface vmove event
When an interface is moving to/from a vnet jail, it may still have BPF descriptors attached. The userland (e.g. tcpdump) does not get noticed that the interface is departing and still opens BPF descriptors thus may result in leaking sensitive traffic (e.g. an interface is moved back to parent jail but a user is still sniffing traffic over it in the child jail). Detach BPF descriptors so that the userland will be signaled. Reviewed by: ae MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45727 (cherry picked from commit 1ed9b381d4701fc9f66741256e93b96e22273217) ifnet: Fix build without BPF The newly introduced function bpf_ifdetach() is only available when device bpf is enabled. Fixes: 1ed9b381d470 ifnet: Detach BPF descriptors on interface vmove event (cherry picked from commit d8413a1c3ba235a79ae6b8cc35767a861855c7e2)
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters