From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Koch To: development@lists.ipfire.org Subject: [PATCH 0/2] zonconf: replace the nic-names with eth... and wlan... or not? Date: Tue, 03 Sep 2019 23:46:22 +0200 Message-ID: <20190903214624.2280-1-ipfire@starkstromkonsument.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8360168379986696348==" List-Id: --===============8360168379986696348== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I stumbled into this when I was searching for an error in my vlan and bridge-= config and want to start a discussion about if this should be changed or not. The zoneconf.cgi contains the following code-snippet: > # Name the physical NICs > # Even though they may not be really named like this, we will name them eth= X or wlanX > my $ethcount =3D 0; > my $wlancount =3D 0; > > foreach (@nics) { > my $nic =3D $_->[1]; > > if (-e "/sys/class/net/$nic/wireless") { > $_->[1] =3D "wlan$wlancount"; > $_->[2] =3D 1; > $wlancount++; > } else { > $_->[1] =3D "eth$ethcount"; > $ethcount++; > } > } This renames all the nics to ethX or wlanX for the WUI. When you use any comm= andline tool (e.g ip addr or brctl show) the names of the NICs will mismatch = with the ones shown in the WUI. Same for the assigened VLAN-IDs. For example, one of my setups: - WUI name --> real name - eth0 --> red0 - eth1 --> eth1 - eth2 --> orange0 - wlan0 --> blue0 - wlan1 --> wlan1 What is the goal of doing this? I personally think this is more confusing tha= n useful. I would prefer to not rename the NICs. What do you think? I attached a patch to change the naming back to the real names. Please decide= to merge it or not, depending on where the discussion ends. Secondly I created a patch to add the current output of "brctl show" and "ip = addr" to the zoneconfig page. It's quite useful to have this by the hand with= out having to open a shell sometimes. Regards, Alex Alex Koch (2): zoneconf: Show real names of NICs in the WUI zoneconf: Add status output of "brctl show" and "ip addr" html/cgi-bin/zoneconf.cgi | 34 ++++++++++++++++++++++++---------- langs/de/cgi-bin/de.pl | 5 ++++- langs/en/cgi-bin/en.pl | 5 ++++- 3 files changed, 32 insertions(+), 12 deletions(-) -- 2.17.1 --===============8360168379986696348==--