udev fail to rename netif at startup

Bug #416782 reported by masterware
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Fix Released
Medium
Scott James Remnant (Canonical)

Bug Description

Binary package hint: udev

in file /udev-145/udev/udev-event.c line 495

 util_strscpy(ifr.ifr_newname, IFNAMSIZ, "_rename");

should be replace by :

 strncat(ifr.ifr_newname, "_rename", IFNAMSIZ);

because if you have multiple network interface (like me 10 ...) and you change the file /etc/udev/rules.d/70-persistent-net.rules the udev module will try to change the interface name to all the same name "_rename" instead of "ethx_rename"

I rebuild the udev-145 package with this change and it work fine now !

Revision history for this message
masterware (masterware) wrote :

this is related to karmic udev-145.1 package

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Thanks, it looks like this bug was introduced by Kay when adjusting the string util functions:

committer: Kay Sievers <email address hidden>
timestamp: Wed 2009-05-20 17:57:52 +0200
message:
  use more efficient string copying

                /* free our own name, another process may wait for us */
- util_strlcpy(ifr.ifr_newname, udev_device_get_sysname(dev), IFNAMSIZ);
- util_strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ);
+ util_strscpy(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev));
+ util_strscpy(ifr.ifr_newname, IFNAMSIZ, "_rename");

Changed in udev (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Scott James Remnant (scott)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package udev - 147~-3

---------------
udev (147~-3) karmic; urgency=low

  * Update to GIT HEAD (still pre 147 release):
    - includes fix from previous revision
    - rename interfaces to <iface>_rename if rename fails. LP: #416782.
    - drop most NAME keys since 2.6.31 supplies them.
    - especially those with just "%k". LP: #430654.
    - fixed SYMLINK option parsing. LP: #430654.

  * Remove 40-alsa.rules now it's not shipped upstream.

 -- Scott James Remnant <email address hidden> Mon, 21 Sep 2009 16:02:32 -0700

Changed in udev (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.