Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 2023 07:46:12 -0600
From:      Mike Karels <mike@karels.net>
To:        Franco Fichtner <franco@opnsense.org>
Cc:        Kristof Provost <kp@FreeBSD.org>, =?utf-8?q?Mina_Gali=C4=87?= <freebsd@igalic.co>, freebsd-net@freebsd.org
Subject:   Re: How to tell if a network interface was renamed (and from what)
Message-ID:  <C76B1C71-EE24-4B30-A7B6-50602F98C9E5@karels.net>
In-Reply-To: <3081C679-F5AC-4610-BC6B-00ADA5DC17E7@opnsense.org>
References:  <pdHC0ObBkAbx2HfFIhWYaB5-dmQDEUzNTWvVVJAuJV7FWdWWeSwybVFD-uyBUxPlqDRpAW7D1aAZsbrTxEj9kqsq7ESgO41srPmS-PcXGqw=@igalic.co> <E5F5F61E-3827-404A-A46F-BBCF45A29A82@FreeBSD.org> <9eef5488-e8da-4edd-bc00-baeb5aaf4a23@FreeBSD.org> <ptnVEMJ_x48tdYePN4iYRiEW2vWqwulbEOUJ4dQ1cKGkxNXZPPfdEVHdJKNHFfs2onxNipVZKPwDZZKlDv1peS1Xttim1VitMFsdUiTkAKE=@igalic.co> <032BADD4-0A49-42E2-BAAB-40D2F76C64B9@FreeBSD.org> <rvRLOlpJc9xIf67ZwmZ4Si6TN2VtmIuyuguoQgEk5NTOeqsqkAwB_9KvlMbW6y-npSjCC2lmLVXbD4oIqyKJdDboThcWiehF_hU0L9D6GZc=@igalic.co> <31B38FCE-0B67-4122-A202-568150E971E1@karels.net> <F2536F44-5C61-4AE3-BEDA-705DD660A8F7@FreeBSD.org> <B514CB40-036E-442F-98E9-EFCF74EC8BCE@opnsense.org> <BA3A28C2-5F39-48D8-B0FF-520DE2F441F7@karels.net> <3081C679-F5AC-4610-BC6B-00ADA5DC17E7@opnsense.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 21 Nov 2023, at 0:43, Franco Fichtner wrote:

>> On 20. Nov 2023, at 23:06, Mike Karels <mike@karels.net> wrote:
>>
>> On 20 Nov 2023, at 15:16, Franco Fichtner wrote:
>>
>>> All that is really missing is a way to print it via ifconfig command.
>>
>> That is trivial to add; I just tested it.  It also has problems with
>> epair.  Maybe that isn't an issue for this purpose.
>
> Two things to consider:
>
> Does epair do it the "right way"?  And does it even matter given that this
> behaviour hasn't had any exposure and is likely ever going to be used
> as input for another tool?

epair arguably does it wrong; it doesn't follow the convention of using the
driver name followed by an integer.  However, what it does is practical, and
clearly we don't want to change it now.  Using the driver name as returned
by ifconfig_get_orig_addr displays "epair0" for two interfaces.  If they have
been renamed, the new names will hopefully be suggestive of which is which.

Mina, do you care about epair, or is the behavior I described sufficient
for your purposes?

		Mike

> I mean it still tracks the origin in the driver.  This way you can even find
> the epair belonging together.  It looks like it should given the design
> choices.
>
>
> Cheers,
> Franco



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C76B1C71-EE24-4B30-A7B6-50602F98C9E5>