Files
freebsd/share
Devin Teske 19b0b1f648 examples/jails: Encode ifnames used as derive_mac counters
derive_mac keeps a per-parent branch index in a global named from the
parent interface so the N nibble can increment when the same PHY is
presented more than once. That name must be a POSIX identifier; a
vlan-style parent (em0.20) is not.

Encode the ifname first (alnum unchanged, every other byte as _HH) so
the lookup stays a symbol-table hit and em0.20 does not collide with
em0_20. Same change in jib (9.2) and jng (9.4).

In jng, also address netgraph by node name. ngctl(8) treats `.' and
`:' as control characters, so ng_ether(4) names its node after the
sanitized ifname (vtnet0.20 becomes vtnet0_20). Sanitize the parent
ifname where it enters and use that for every ngctl call; ifconfig(8)
and derive_mac keep the real name. Previously jng failed outright on
such parents where jib did not.

PR:		291143
Reported by:	Victor <[email protected]>
MFC after:	1 week
Reviewed by:	jlduran
Differential Revision:	https://reviews.freebsd.org/D59326
2026-09-02 23:17:52 -07:00
..
2026-03-09 15:40:31 -04:00
…
2026-09-01 15:28:28 +00:00
2025-12-06 12:20:17 +00:00
2025-12-06 12:20:18 +00:00
2026-04-14 09:02:58 -04:00
…
2026-01-31 19:27:37 -05:00
2026-04-17 06:45:32 -03:00
…