Page MenuHomeFreeBSD

sockstat: Attach to jail if in new vnet
ClosedPublic

Authored by freqlabs on Apr 14 2020, 7:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 8:51 PM
Unknown Object (File)
Thu, Dec 5, 11:43 PM
Unknown Object (File)
Nov 19 2024, 2:38 AM
Unknown Object (File)
Nov 18 2024, 9:34 AM
Unknown Object (File)
Nov 18 2024, 9:33 AM
Unknown Object (File)
Nov 18 2024, 9:24 AM
Unknown Object (File)
Nov 18 2024, 7:40 AM
Unknown Object (File)
Nov 4 2024, 12:05 AM

Details

Summary

Attach sockstat to the specified jail if the jail is in a new vnet.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bcr added a subscriber: bcr.

OK from manpages.

It may be a better user interface if "-j" automatically did the right thing - limit output to the specified jail for traditional jails, and attach to vnet jails. So after the jail_getid(), a jail_get() or jail_getv() to fetch the jail's vnet parameter. Then the jail_attach() can happen if the vnet is JAIL_SYS_NEW.

That's not quite perfect, as it wouldn't detect a non-vnet jail that's a child of a vnet jail. But it would seamlessly cover the common cases.

freqlabs retitled this revision from sockstat: Add an option for attaching to a jail to sockstat: Attach to jail if in new vnet.
freqlabs edited the summary of this revision. (Show Details)

Integrate with existing -j option, per suggestion by @jamie

This revision is now accepted and ready to land.Apr 24 2020, 3:50 PM
This revision was automatically updated to reflect the committed changes.