Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Nov 2023 14:34:23 +0000
From:      =?utf-8?Q?Mina_Gali=C4=87?= <freebsd@igalic.co>
To:        Kyle Evans <kevans@FreeBSD.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: How to tell if a network interface was renamed (and from what)
Message-ID:  <ptnVEMJ_x48tdYePN4iYRiEW2vWqwulbEOUJ4dQ1cKGkxNXZPPfdEVHdJKNHFfs2onxNipVZKPwDZZKlDv1peS1Xttim1VitMFsdUiTkAKE=@igalic.co>
In-Reply-To: <9eef5488-e8da-4edd-bc00-baeb5aaf4a23@FreeBSD.org>
References:  <pdHC0ObBkAbx2HfFIhWYaB5-dmQDEUzNTWvVVJAuJV7FWdWWeSwybVFD-uyBUxPlqDRpAW7D1aAZsbrTxEj9kqsq7ESgO41srPmS-PcXGqw=@igalic.co> <E5F5F61E-3827-404A-A46F-BBCF45A29A82@FreeBSD.org> <9eef5488-e8da-4edd-bc00-baeb5aaf4a23@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


> > FreeBSD currently does not preserve the old ( original ) name of
> > interfaces if it is renamed ( either physical or cloned ones ).
> > While there's an attempt https://reviews.freebsd.org/D28247
> > to get the device name (physical
> > ones) but it is not perfect and not completed.
> >=20
> > So may I ask why you need to know if a network interface was renamed ?
>=20
>=20
> Just last week I found this quite a pain as well; once an interface has
> been renamed, if it's not a pseudo-interface with an obvious group
> there's no clear way, AFAICT, to determine which driver created it

I think the main reason that we need to know if and from what an interface =
has been renamed is if we need to know what driver we're working with.

But given that a rename doesn't change =E2=80=94 or even just *alias*
the sysctl dev hierarchy, where a %driver is recorded, we can't
track it back.

(but again, that's just for physical devices, then again virtual devices re=
cord what type of device they are in their group which
is essentially the same thing)

As soon as we have more than one interface with different drivers
it's impossible to parse out what we're dealing with without
parsing rc.conf, logs, or worse things I can't think of right now.







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ptnVEMJ_x48tdYePN4iYRiEW2vWqwulbEOUJ4dQ1cKGkxNXZPPfdEVHdJKNHFfs2onxNipVZKPwDZZKlDv1peS1Xttim1VitMFsdUiTkAKE=>