From nobody Fri Oct 20 20:56:04 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SBxhM2D0Tz4yDBJ for ; Fri, 20 Oct 2023 20:56:19 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SBxhM0FQbz4WWh for ; Fri, 20 Oct 2023 20:56:19 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-507973f3b65so1905372e87.3 for ; Fri, 20 Oct 2023 13:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697835376; x=1698440176; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Bl4ly/v9yPpNbUTzVN9MBPadvomoXwi2dZzeDxZjDPs=; b=NYTKj351tnZxgbFaW/wXKFZwaqDbyUex05Zcm+EJFUThqad28W1OFwYYJbdcgGxFTT hsqW2LZJOgfGdYtDe1gz2Y11AGJa+YUKXya5b7fxwezYIZqLMACsRNxnd/Fk1RZdt2Ko d9r9L/ZGurp4D7NeGbXzHehM3Llk0gDUoeOPJLWAguJDwNwMpx4S87wmnWuoUvYTuC2H i8gId2pP3ck8c/fbtvYqQIBQuH59J6Dgdwe3FEWAyyHn6KOoogh7B1ZZnO0KJhJbv4ag fPoT7ysrdm5G8w0YF6q2nLC2cLD6xM3JhTBmyvm/eDWIppb0BKuqdXYbKbsXxuTfeXXX fj/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697835376; x=1698440176; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Bl4ly/v9yPpNbUTzVN9MBPadvomoXwi2dZzeDxZjDPs=; b=A77snv7CQBtaEaxCD7CiCRhzZdeWhVY7UuGM1ucUbj3Okd8SmCf3Uge+fyowtnP5Ei 8rusQ9tlVJKYtUsKxCxQ+Xo7LqdLbzi24qPgmlznNqpfvLe4KClvPJ1ydi0VfRQ3zcFU 2rNRcTtU9MKwp2bsJMMA9d59EBDF9c7cUFiQ8PP4I6V9Jxbv4+qc80FdnbG8Ch6tlrf1 br/n7VsdHGdiRJXhK85mFNAlu6hl0kdS65pRsbwO7vCAbqztVDju04kR8Lp3sqQV0JPg 17eFOQkNJ4221dqJatapXl9PdFYXJC6znyx+hCfhWXTrz/sLljA2dUYg+/R6LkTF0o+n V5AA== X-Gm-Message-State: AOJu0YxNwojNQJqF1ADI7lTR6HCoeBUSTjrhS2Y9LJEpqyQ+OXQnuW92 fIdVYKFnPCjcGPE4Gp58Ebx35qrhKniKAtfIUg== X-Google-Smtp-Source: AGHT+IEZi+jN8uwBYCkJeKOZlidrEjEwuX4UQc4sxV6VXtwHGmtRDhrA7nmo9L16XML1+FPr36JytU3U7Bo2T800xOQ= X-Received: by 2002:a19:550d:0:b0:504:2d54:b4d0 with SMTP id n13-20020a19550d000000b005042d54b4d0mr2075277lfe.19.1697835375719; Fri, 20 Oct 2023 13:56:15 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <827d9e2e-5416-42ca-9ee1-dde398a23b21@nebelschwaden.de> In-Reply-To: <827d9e2e-5416-42ca-9ee1-dde398a23b21@nebelschwaden.de> From: Paul Procacci Date: Fri, 20 Oct 2023 16:56:04 -0400 Message-ID: Subject: Re: limit of network interface name length? To: listac@nebelschwaden.de Cc: Freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="00000000000074fbf506082c1a21" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4SBxhM0FQbz4WWh --00000000000074fbf506082c1a21 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Oct 20, 2023 at 4:31=E2=80=AFPM Ede Wolf = wrote: > Hello, > > I am trying to rename a couple of interfaces, and it works for some, for > others not. > > Trying to find what I may be doing wrong, a patter that seems to emerge, > is, that if names longer than 14Bytes are not supported. Maybe the " > make up for the missing bytes up to 16. > > F.e.: > > ifconfig_epair6a_name=3D"jail_template_local" > > does not work. The interface names remaines epair6a. > Is that documented anywhere? > > Or can anyone confirm this limit on solid grounds? Just to make sure I > have not done anything other wrong. > > Thanks > > Ede > > It's defined as 16 bytes. "/* * Length of interface external name, including terminating '\0'. * Note: this is the same size as a generic device's external name. */ #define IF_NAMESIZE 16 #if __BSD_VISIBLE #define IFNAMSIZ IF_NAMESIZE" ~Paul --=20 __________________ :(){ :|:& };: --00000000000074fbf506082c1a21 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Oct 20, 2023 at 4:31=E2= =80=AFPM Ede Wolf <listac@neb= elschwaden.de> wrote:
Hello,

I am trying to rename a couple of interfaces, and it works for some, for others not.

Trying to find what I may be doing wrong, a patter that seems to emerge, is, that if names longer than 14Bytes are not supported. Maybe the " <= br> make up for the missing bytes up to 16.

F.e.:

ifconfig_epair6a_name=3D"jail_template_local"

does not work. The interface names remaines epair6a.
Is that documented anywhere?

Or can anyone confirm this limit on solid grounds? Just to make sure I
have not done anything other wrong.

Thanks

Ede


It's defined as 16 bytes.<= br>
"/*
=C2=A0* Length of interface external name, including ter= minating '\0'.
=C2=A0* Note: this is the same size as a generic = device's external name.
=C2=A0*/
#define =C2=A0 =C2=A0 =C2=A0 =C2= =A0 IF_NAMESIZE =C2=A0 =C2=A0 16
#if __BSD_VISIBLE
#define =C2=A0 =C2= =A0 =C2=A0 =C2=A0 IFNAMSIZ =C2=A0 =C2=A0 =C2=A0 =C2=A0IF_NAMESIZE"
=
~Paul

--
________= __________

:(){ :|:& };:
--00000000000074fbf506082c1a21--