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)
Wed, Nov 12, 8:45 AM
Unknown Object (File)
Wed, Nov 12, 2:08 AM
Unknown Object (File)
Mon, Nov 10, 8:39 PM
Unknown Object (File)
Wed, Oct 29, 10:04 PM
Unknown Object (File)
Wed, Oct 29, 10:01 PM
Unknown Object (File)
Wed, Oct 29, 10:00 PM
Unknown Object (File)
Wed, Oct 29, 8:59 PM
Unknown Object (File)
Wed, Oct 29, 8:59 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 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.