From: Daan De Meyer Date: Tue, 5 Apr 2022 13:00:45 +0000 (+0200) Subject: Shorten interface names to 12 characters X-Git-Tag: v13~50^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=badec9f43545365e90f645b8c816aed51e276ba0;p=thirdparty%2Fmkosi.git Shorten interface names to 12 characters Off by one bug, interface names can only be 15 characters instead of 16 characters so we need to limit the name to 12 characters instead of 13. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 68059e726..48d221c8b 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -7428,9 +7428,9 @@ def suppress_stacktrace() -> Iterator[None]: def virt_name(args: MkosiArgs) -> str: name = args.hostname or args.image_id or args.output.with_suffix("").name.partition("_")[0] - # Shorten to 13 characters so we can prefix with ve- or vt- for the netdev ifname which is limited - # to 16 characters. - return name[:13] + # Shorten to 12 characters so we can prefix with ve- or vt- for the netdev ifname which is limited + # to 15 characters. + return name[:12] def has_networkd_vm_vt() -> bool: