public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
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	[thread overview]
Message-ID: <06C5ADFE-5840-4FAC-8861-83A96CA2C375@ipfire.org> (raw)
In-Reply-To: =?utf-8?q?=3Cjk5V3ewEE3ZQkL4Sw5iLmNkutlGLaX9vP078NAXCdyTfbSQyTg?= =?utf-8?q?aEnHvq4UOFJc4xYYmg1ld60uzEsJGiejERoveUnBPTq58=5FItuqkw9RFFQ=3D=40?= =?utf-8?q?protonmail=2Ecom=3E?=

[-- Attachment #1: Type: text/plain, Size: 2819 bytes --]

Hi,

I agree with both of you :)

Showing the “old” 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 decide which NIC is being assigned to what zone, right?

-Michael

> On 4 Sep 2019, at 07:49, Florian Bührle <erdlof(a)protonmail.com> wrote:
> 
> Hi Alex,
> 
> your point is absolutely correct, however there's some thought behind this: as the udev rules rename the physical interfaces to <zone>0 when the interface accesses the zone directly, it could be quite confusing if the interface is named orange0 for example and you want to assign it to blue in the CGI, even though it would work fine. 
> What do you think?
> 
> Regards
> Florian
> 
> Gesendet von ProtonMail mobile
> 
> 
> 
> -------- Original-Nachricht --------
> An 3. Sep. 2019, 23:46, Alex Koch schrieb:
> 
> 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 ethX or wlanX
> > my $ethcount = 0;
> > my $wlancount = 0;
> >
> > foreach (@nics) {
> > my $nic = $_->[1];
> >
> > if (-e "/sys/class/net/$nic/wireless") {
> > $_->[1] = "wlan$wlancount";
> > $_->[2] = 1;
> > $wlancount++;
> > } else {
> > $_->[1] = "eth$ethcount";
> > $ethcount++;
> > }
> > }
> 
> This renames all the nics to ethX or wlanX for the WUI. When you use any commandline 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 than 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 without 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
> 


             reply	other threads:[~2019-09-05  9:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05  9:27 Michael Tremer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-09-03 21:46 Alex Koch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06C5ADFE-5840-4FAC-8861-83A96CA2C375@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox