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)
Mon, Nov 4, 12:05 AM
Unknown Object (File)
Mon, Nov 4, 12:05 AM
Unknown Object (File)
Mon, Nov 4, 12:05 AM
Unknown Object (File)
Mon, Nov 4, 12:05 AM
Unknown Object (File)
Mon, Nov 4, 12:05 AM
Unknown Object (File)
Sun, Nov 3, 11:44 PM
Unknown Object (File)
Sep 19 2024, 7:22 PM
Unknown Object (File)
Sep 19 2024, 6:16 PM

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 Skipped
Unit
Tests Skipped

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.