Page MenuHomeFreeBSD

examples/jails: Allow any character in interface names
ClosedPublic

Authored by jlduran on Nov 21 2025, 7:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Aug 22, 1:06 AM
Unknown Object (File)
Sun, Aug 16, 7:10 AM
Unknown Object (File)
Sat, Aug 8, 9:47 AM
Unknown Object (File)
Aug 3 2026, 12:57 PM
Unknown Object (File)
Aug 2 2026, 6:13 AM
Unknown Object (File)
Aug 2 2026, 1:21 AM
Unknown Object (File)
Aug 1 2026, 6:34 AM
Unknown Object (File)
Jul 24 2026, 10:44 AM
Tokens
"Like" token, awarded by freebsd.68fba_nospam.spacesurfer.com.

Details

Summary

Interface names have no limitations on the allowed character set, only
a length restriction.

Widen the allowed character set for interface names to include any
printable character.

PR: 290916

Diff Detail

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

Event Timeline

Include the same pattern in jib_destroy(), jng_shutdown(), and jng_stats().

Using tabs, spaces or newlines in interface names is just asking for trouble. A lot of the rc.d shell code is not properly written to deal with such intentional stupidity.

Using tabs, spaces or newlines in interface names is just asking for trouble. A lot of the rc.d shell code is not properly written to deal with such intentional stupidity.

Right, I agree, I believe isprint(3) does not include those...
Probably the original pattern stems from rc.subr (*[!a-zA-Z0-9_]). If I remember correctly, @dteske preferred creating jails using rc.conf and not jail.conf (a vague recollection of some YouTube video).

Interesting.

BastilleBSD has code to automatically sed ‘s/-/_/‘ for the /etc/rc.conf part when jail names contain a hyphen.

I would at least consider allowing (.) as they are very common when using vlan with interfaces.

This is an excellent change. Moving forward with landing it. Thank you for your hard work (sorry for the delay).

This revision is now accepted and ready to land.Sat, Aug 22, 1:05 AM