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)
Fri, Apr 12, 9:58 PM
Unknown Object (File)
Fri, Apr 5, 8:39 PM
Unknown Object (File)
Jan 14 2024, 1:44 AM
Unknown Object (File)
Jan 12 2024, 8:51 AM
Unknown Object (File)
Dec 23 2023, 8:03 PM
Unknown Object (File)
Dec 20 2023, 11:31 AM
Unknown Object (File)
Dec 20 2023, 7:42 AM
Unknown Object (File)
Nov 27 2023, 8:13 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.