lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 20 Apr 2009 18:07:58 +0200
From:	Peter Korsgaard <jacmet@...site.dk>
To:	Marcin Juszkiewicz <marcin@...zkiewicz.com.pl>
Cc:	netdev@...r.kernel.org
Subject: Re: dm9601 as ethX or usbX?

>>>>> "Marcin" == Marcin Juszkiewicz <marcin@...zkiewicz.com.pl> writes:

Hi,

 Marcin> Is this normal behaviour of those adapters that ones with empty eeprom
 Marcin> ends as usbX?

Yes. The code in question is located in
drivers/net/usb/usbnet.c:usbnet_probe():

        strcpy (net->name, "usb%d");
...
                // heuristic:  "usb%d" for links we know are two-host,
                // else "eth%d" when there's reasonable doubt.  userspace
                // can rename the link if it knows better.
                if ((dev->driver_info->flags & FLAG_ETHER) != 0
                                && (net->dev_addr [0] & 0x02) == 0)
                        strcpy (net->name, "eth%d");


Bit 1 of the most significant byte of the MAC address specifies that
it's a locally generated (E.G. random) MAC address, which is what
dm9601.c will use if there's nothing specified in the EEPROM (or there
isn't any EEPROM connected).

 Marcin> I would prefer to have both as ethX as I use them in devices
 Marcin> where usbX as usually usb-gadget (g_ether) and as such usb0
 Marcin> is configured in total different scheme.

 Marcin> I know that one of options would be using udev and renaming
 Marcin> of interface but then I would have to remember to always copy
 Marcin> that rule to each device.

Sorry, other than that I don't know any other options (you could
ofcourse try to convince the usbnet maintainer to change the usbnet
logic, but it seems pretty sensible to me).

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ