Page MenuHomeFreeBSD

ifconfig: Enter jail as soon as possible
ClosedPublic

Authored by des on Sep 12 2025, 4:22 PM.
Tags
None
Referenced Files
F168673024: D52501.id.diff
Sat, Aug 29, 1:43 PM
Unknown Object (File)
Tue, Aug 25, 12:20 AM
Unknown Object (File)
Sat, Aug 22, 11:25 PM
Unknown Object (File)
Fri, Aug 21, 6:07 PM
Unknown Object (File)
Thu, Aug 20, 11:51 AM
Unknown Object (File)
Wed, Aug 19, 5:41 AM
Unknown Object (File)
Sun, Aug 9, 5:29 AM
Unknown Object (File)
Sat, Aug 8, 11:44 AM
Subscribers

Details

Summary

Some options (in particular, -g) are processed immediately upon being
parsed. This will produce the wrong result in combination with -j since
we only attach to the jail after we're done parsing arguments. Solve
this by attaching to the jail immediately when -j is encountered. The
downside is that e.g. ifconfig -j foo -j bar would previously attach
to jail “bar”, whereas now it will attempt to attach to jail “foo”, and
if successful, attempt to attach to jail “bar” within jail “foo”. This
may be considered a feature.

PR: 289134
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66993
Build 63876: arc lint + arc unit