Page MenuHomeFreeBSD

ifconfig: Enter jail as soon as possible
ClosedPublic

Authored by des on Sep 12 2025, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 27, 4:19 PM
Unknown Object (File)
Sat, Feb 21, 5:36 AM
Unknown Object (File)
Tue, Feb 10, 3:32 PM
Unknown Object (File)
Fri, Feb 6, 7:38 AM
Unknown Object (File)
Tue, Feb 3, 11:06 PM
Unknown Object (File)
Tue, Feb 3, 7:51 AM
Unknown Object (File)
Jan 15 2026, 11:45 PM
Unknown Object (File)
Jan 14 2026, 9:36 PM
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 Not Applicable
Unit
Tests Not Applicable