Mailinglist Archive: opensuse-bugs (5243 mails)

< Previous Next >
[Bug 809843] Random eth0/eth1 name space with two Ethernet driver modules

--- Comment #47 from Marius Tomaschewski <mt@xxxxxxxx> 2013-03-28 13:50:46 UTC
(In reply to comment #45)
This was the issue or the missing code in rename_netif:

Mar 28 10:19:32 systemd-udevd[270]: renamed network
interface eth1 to rename3
Mar 28 10:19:32 systemd-udevd[271]: renamed network
interface eth0 to eth1

Udev has to rename to ifindex based $tmpname first as soon as possible,
so another rule is able to rename to the currently occupied name.
Basically something like this ("pseudo code" just for illustration):

ip link set name "$wanted" dev "$current" && return 0 || {

# rename to tmpname to allow another rule to rename to $current
read idx < "/sys/class/net/$current/ifindex"
ip link set name "$tmpname" || return 1

# schedule a "rename later" / do it in background
for ((i=0; i<1000; i++)) ; do
ip link set name "$wanted" dev "$current" && return 0
usleep 25000
) &
disown -a

and it were IMO doing this before. It could be, that this were a patch

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >