udev: net_id - fix OUI handling

This commit is contained in:
Kay Sievers 2012-12-06 21:37:10 +01:00
parent 0d6ce9236f
commit 971e7fb625
1 changed files with 2 additions and 2 deletions

View File

@ -330,9 +330,9 @@ static int names_mac(struct udev_device *dev, struct netnames *names) {
/* IEEE Organizationally Unique Identifier vendor string */
static int ieee_oui(struct udev_device *dev, struct netnames *names, bool test) {
char str[IFNAMSIZ];
char str[32];
if (names->mac_valid)
if (!names->mac_valid)
return -ENOENT;
/* skip commonly misused 00:00:00 (Xerox) prefix */
if (memcmp(names->mac, "\0\0\0", 3) == 0)