From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 0/2] zonconf: replace the nic-names with eth... and wlan... or not? Date: Thu, 05 Sep 2019 10:27:44 +0100 Message-ID: <06C5ADFE-5840-4FAC-8861-83A96CA2C375@ipfire.org> In-Reply-To: =?utf-8?q?=3Cjk5V3ewEE3ZQkL4Sw5iLmNkutlGLaX9vP078NAXCdyTfbSQyTg?= =?utf-8?q?aEnHvq4UOFJc4xYYmg1ld60uzEsJGiejERoveUnBPTq58=5FItuqkw9RFFQ=3D=40?= =?utf-8?q?protonmail=2Ecom=3E?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3220758814249237083==" List-Id: --===============3220758814249237083== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I agree with both of you :) Showing the =E2=80=9Cold=E2=80=9D names is confusing. Numbering them again is= also not helpful. Is it better if we do not show any device name at all? Nobody needs that to d= ecide which NIC is being assigned to what zone, right? -Michael > On 4 Sep 2019, at 07:49, Florian B=C3=BChrle wrot= e: >=20 > Hi Alex, >=20 > your point is absolutely correct, however there's some thought behind this:= as the udev rules rename the physical interfaces to 0 when the interfa= ce accesses the zone directly, it could be quite confusing if the interface i= s named orange0 for example and you want to assign it to blue in the CGI, eve= n though it would work fine.=20 > What do you think? >=20 > Regards > Florian >=20 > Gesendet von ProtonMail mobile >=20 >=20 >=20 > -------- Original-Nachricht -------- > An 3. Sep. 2019, 23:46, Alex Koch schrieb: >=20 > Hi, >=20 > I stumbled into this when I was searching for an error in my vlan and bridg= e-config and want to start a discussion about if this should be changed or no= t. >=20 > The zoneconf.cgi contains the following code-snippet: >=20 > > # Name the physical NICs > > # Even though they may not be really named like this, we will name them e= thX 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++; > > } > > } >=20 > This renames all the nics to ethX or wlanX for the WUI. When you use any co= mmandline tool (e.g ip addr or brctl show) the names of the NICs will mismatc= h with the ones shown in the WUI. Same for the assigened VLAN-IDs. >=20 > For example, one of my setups: >=20 > - WUI name --> real name > - eth0 --> red0 > - eth1 --> eth1 > - eth2 --> orange0 > - wlan0 --> blue0 > - wlan1 --> wlan1 >=20 > What is the goal of doing this? I personally think this is more confusing t= han useful. I would prefer to not rename the NICs. What do you think? >=20 > I attached a patch to change the naming back to the real names. Please deci= de to merge it or not, depending on where the discussion ends. >=20 > Secondly I created a patch to add the current output of "brctl show" and "i= p addr" to the zoneconfig page. It's quite useful to have this by the hand wi= thout having to open a shell sometimes. >=20 > Regards, Alex >=20 > Alex Koch (2): > zoneconf: Show real names of NICs in the WUI > zoneconf: Add status output of "brctl show" and "ip addr" >=20 > 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(-) >=20 > -- > 2.17.1 >=20 --===============3220758814249237083==--