Date: Fri, 20 Oct 2023 16:56:04 -0400 From: Paul Procacci <pprocacci@gmail.com> To: listac@nebelschwaden.de Cc: Freebsd-questions@freebsd.org Subject: Re: limit of network interface name length? Message-ID: <CAFbbPugTX%2B8ouxk7_xxCJ9QouPJTdfWnLE-QXQTNyxMdWwj8zQ@mail.gmail.com> In-Reply-To: <827d9e2e-5416-42ca-9ee1-dde398a23b21@nebelschwaden.de>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Fri, Oct 20, 2023 at 4:31 PM Ede Wolf <listac@nebelschwaden.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 "
> make up for the missing bytes up to 16.
>
> F.e.:
>
> ifconfig_epair6a_name="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
--
__________________
:(){ :|:& };:
[-- Attachment #2 --]
<div dir="ltr"><div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 20, 2023 at 4:31 PM Ede Wolf <<a href="mailto:listac@nebelschwaden.de">listac@nebelschwaden.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I am trying to rename a couple of interfaces, and it works for some, for <br>
others not.<br>
<br>
Trying to find what I may be doing wrong, a patter that seems to emerge, <br>
is, that if names longer than 14Bytes are not supported. Maybe the " <br>
make up for the missing bytes up to 16.<br>
<br>
F.e.:<br>
<br>
ifconfig_epair6a_name="jail_template_local"<br>
<br>
does not work. The interface names remaines epair6a.<br>
Is that documented anywhere?<br>
<br>
Or can anyone confirm this limit on solid grounds? Just to make sure I <br>
have not done anything other wrong.<br>
<br>
Thanks<br>
<br>
Ede<br>
<br>
</blockquote></div></div><div><br></div><div>It's defined as 16 bytes.<br><br>"/*<br> * Length of interface external name, including terminating '\0'.<br> * Note: this is the same size as a generic device's external name.<br> */<br>#define IF_NAMESIZE 16<br>#if __BSD_VISIBLE<br>#define IFNAMSIZ IF_NAMESIZE"<br><br></div><div>~Paul</div><div><br></div><div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">__________________<br><br>:(){ :|:& };:</div></div></div>
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFbbPugTX%2B8ouxk7_xxCJ9QouPJTdfWnLE-QXQTNyxMdWwj8zQ>
