Page MenuHomeFreeBSD

jail: Let a couple of parameter types be specified as lists
ClosedPublic

Authored by markj on Nov 17 2024, 11:46 PM.
Referenced Files
Unknown Object (File)
Fri, May 15, 8:50 PM
Unknown Object (File)
Tue, Apr 28, 5:27 PM
Unknown Object (File)
Apr 25 2026, 7:56 PM
Unknown Object (File)
Apr 22 2026, 10:41 PM
Unknown Object (File)
Apr 21 2026, 7:00 AM
Unknown Object (File)
Apr 19 2026, 10:57 AM
Unknown Object (File)
Apr 18 2026, 11:30 AM
Unknown Object (File)
Apr 4 2026, 4:42 PM
Subscribers

Details

Summary

vnet.interface and zfs.dataset can be used to specify multiple
interfaces/datasets in jail.conf, but not on the command-line, which is
a bit surprising. Extend the handling of ip(4|6).addr to those
parameters, update the description of vnet.interface in jail.8, and add
a rudimentary regression test.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note that list-based parameters can be specified disjointedly.

The tests looks good. I need some time to read the code carefully ...

This revision is now accepted and ready to land.Nov 18 2024, 4:55 PM

Not really part of this specific problem, but jail(8) should auto-recognize list parameters because their SYSCTL_JAIL specification has a type with ",a" appended. Ideally, it would build a list of such parameters it sees like that. For non-kernel parameters like vnet.interface and zfs.dataset, putting them in the array is probably as good as its going to get.