Re: Define primary MAC address based on device sticker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Jun 25, 2019 at 01:42:09PM +0200, Adrian Schmutzler wrote:
> Hello,
> 
> OpenWrt and several derived projects typically deal with devices - mostly "routers" - that bundle several netif devices (ethernet and WiFi) in them.
> These built-in netif devices have different MAC addresses assigned to them. However, the vendor typically chooses one of those MAC addresses and puts it on a sticker on the outside of the (bundle) device.
> The choice of the netif device which bears the address is observed to be arbitrary (although not equally distributed).
> 
> For the user, the "sticker MAC address" is equivalent to a name or an identifier which allows him to uniquely identify his (bundle) device. This can be exploited (and is, in fact) e.g. to name routers in networks ("Freifunk" communities), to provide device-specific default-SSIDs (OpenWrt-ddeeff for MAC address aa:bb:cc:dd:ee:ff), etc.
> The "sticker MAC address" uniquely qualifies for this task as it obvious to the user and is given in a standardized and reusable format. MAC address stickers will be found on billions of consumer "routers".
> 
> As the device tree defines an assembled piece of hardware, we are convinced that the "sticker MAC address" qualifies as a property which should be a part of it.
> Since the MAC address will already be bound to an existing (ethernet or WiFi) device, I propose defining an alias which refers to the node of the device bearing the primary mac address of a (bundle) device, e.g.
> 
> aliases {
> 	primary-mac-address = &eth0;
> };
> 
> What do you think?

I think an alias is the right mechanism for this, I don't think
"primary-mac-address" is a great name for it, but I can't immediately
think of a better one.

> 
> Best
> 
> Adrian Schmutzler



-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux