From: Dan Aloni <da-x@gmx.net>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Greg KH <greg@kroah.com>
Subject: sysctl and more SIOCSIFNAME (net device rename) inconsistencies
Date: Sun, 29 Jun 2003 21:36:43 +0300 [thread overview]
Message-ID: <20030629183643.GA2270@callisto.yi.org> (raw)
The day before yesterday I found that renaming a network
device under 2.5 doesn't update sysfs. While trying to
figure this out I've found that there's another stuff that
don't get updated with the new name: sysctl.
My system renames one of my cards to ethlan on boot. Later I
manually renamed it to another name. Here are the 3 different names
that the kernel see for the same network device.
ifconfig, sees the right name (ethlanX):
[root@callisto ~]# ifconfig ethlanX
ethlanX Link encap:Ethernet HWaddr 00:80:AD:00:DB:BC
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:2225 errors:0 dropped:0 overruns:0 frame:0
TX packets:2984 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:472674 (461.5 KiB) TX bytes:2466241 (2.3 MiB)
Interrupt:5 Base address:0xb000
sysfs, sees the name of the device at module load time (eth0 or eth1):
[root@callisto ~]# ls -l /sys/class/net
total 0
drwxr-xr-x 3 root root 0 Jun 29 20:41 eth0
drwxr-xr-x 3 root root 0 Jun 29 20:41 eth1
drwxr-xr-x 3 root root 0 Jun 29 20:41 lo
drwxr-xr-x 3 root root 0 Jun 29 20:41 ppp0
sysctl, sees the name of the device at some point in time
when the directory was instantiated by the user (ethlan):
[root@callisto ~]# ls -l /proc/sys/net/ipv4/conf
total 0
dr-xr-xr-x 2 root root 0 Jun 29 21:20 all
dr-xr-xr-x 2 root root 0 Jun 29 21:20 default
dr-xr-xr-x 2 root root 0 Jun 29 21:20 ethinet
dr-xr-xr-x 2 root root 0 Jun 29 21:20 ethlan
dr-xr-xr-x 2 root root 0 Jun 29 21:20 lo
dr-xr-xr-x 2 root root 0 Jun 29 21:20 ppp0
Note that this is also affects sysctl(2), as it uses /proc:
[root@callisto /home/karrde]# sysctl -a | grep ethlan.tag
net.ipv4.conf.ethlan.tag = 0
I think this should be fixed before 2.6. I'm starting to figure out
about sysfs, but I have no idea how to fix the sysctl part at the
moment.
--
Dan Aloni
da-x@gmx.net
reply other threads:[~2003-06-29 18:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030629183643.GA2270@callisto.yi.org \
--to=da-x@gmx.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®