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, Jan 5, 5:07 PM
Unknown Object (File)
Mon, Dec 30, 8:48 AM
Unknown Object (File)
Fri, Dec 27, 12:38 PM
Unknown Object (File)
Fri, Dec 27, 11:46 AM
Unknown Object (File)
Dec 11 2024, 7:18 AM
Unknown Object (File)
Dec 10 2024, 9:42 PM
Unknown Object (File)
Dec 10 2024, 4:01 AM
Unknown Object (File)
Dec 5 2024, 10:07 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.