]> err.no Git - systemd/commitdiff
fix network interface name swapping
authorKay Sievers <kay.sievers@vrfy.org>
Tue, 2 Dec 2008 00:04:23 +0000 (01:04 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 2 Dec 2008 00:04:23 +0000 (01:04 +0100)
udev/udev-event.c

index 32b45e9baca6c039932b4b875b4b03b15425d9a7..bc692392d2b128298f9e8b3ca7c8cbf98b564634 100644 (file)
@@ -514,7 +514,7 @@ static int rename_netif(struct udev_event *event)
 
                /* wait 30 seconds for our target to become available */
                util_strlcpy(ifr.ifr_name, ifr.ifr_newname, IFNAMSIZ);
-               util_strlcpy(ifr.ifr_newname, udev_device_get_devnode(dev), IFNAMSIZ);
+               util_strlcpy(ifr.ifr_newname, event->name, IFNAMSIZ);
                loop = 30 * 20;
                while (loop--) {
                        err = ioctl(sk, SIOCSIFNAME, &ifr);
@@ -529,7 +529,7 @@ static int rename_netif(struct udev_event *event)
                                break;
                        }
                        dbg(event->udev, "wait for netif '%s' to become free, loop=%i\n",
-                           udev_device_get_devnode(dev), (30 * 20) - loop);
+                           event->name, (30 * 20) - loop);
                        usleep(1000 * 1000 / 20);
                }
        }