Page MenuHomeFreeBSD

pf: clean up pflow sockets on jail removal
ClosedPublic

Authored by kp on Nov 13 2024, 8:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 18, 1:20 PM
Unknown Object (File)
Sun, Aug 16, 3:10 PM
Unknown Object (File)
Fri, Aug 14, 1:04 PM
Unknown Object (File)
Tue, Aug 11, 5:43 PM
Unknown Object (File)
Mon, Aug 10, 10:26 AM
Unknown Object (File)
Sun, Aug 9, 2:56 PM
Unknown Object (File)
Sat, Aug 8, 3:29 AM
Unknown Object (File)
Fri, Aug 7, 10:07 PM

Details

Summary

pflow opens sockets in the kernel to transmit netflow information.
If this is done in a (vnet) jail these sockets end up preventing the removal of
the jail. The VNET_SYSUNINIT() vnet_pflowdetach() function doesn't get called,
but that's the function that would remove the sockets.

Install a callback on the PR_METHOD_REMOVE jail callback and close the sockets
there. This ensures that the jail can get cleaned up.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60524
Build 57408: arc lint + arc unit

Event Timeline

kp requested review of this revision.Nov 13 2024, 8:29 PM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 18 2024, 11:23 AM
This revision was automatically updated to reflect the committed changes.