Page MenuHomeFreeBSD

pf: clean up pflow sockets on jail removal
ClosedPublic

Authored by kp on Wed, Nov 13, 8:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 3:30 AM
Unknown Object (File)
Tue, Nov 19, 1:45 AM
Unknown Object (File)
Mon, Nov 18, 11:22 AM
Unknown Object (File)
Mon, Nov 18, 11:22 AM
Unknown Object (File)
Fri, Nov 15, 3:55 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.Wed, Nov 13, 8:29 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mon, Nov 18, 11:23 AM
This revision was automatically updated to reflect the committed changes.