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)
Sun, Mar 9, 8:31 PM
Unknown Object (File)
Sat, Mar 8, 10:09 PM
Unknown Object (File)
Feb 17 2025, 8:16 AM
Unknown Object (File)
Feb 4 2025, 11:20 PM
Unknown Object (File)
Feb 4 2025, 8:05 AM
Unknown Object (File)
Jan 27 2025, 7:17 AM
Unknown Object (File)
Jan 26 2025, 3:54 PM
Unknown Object (File)
Jan 26 2025, 10:59 AM

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 Not Applicable
Unit
Tests Not Applicable

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.