Mailinglist Archive: opensuse-bugs (5243 mails)

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

https://bugzilla.novell.com/show_bug.cgi?id=809843

https://bugzilla.novell.com/show_bug.cgi?id=809843#c47


--- 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 opensuse123.suse.cz systemd-udevd[270]: renamed network
interface eth1 to rename3
Mar 28 10:19:32 opensuse123.suse.cz 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):

tmp="tmp"
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"
tmpname="${tmp}-${idx}"
ip link set name "$tmpname" || return 1

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

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

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
References