[OpenWrt-Devel] Trivial lan_mac "re-set" in 02_network of ramips target

Adrian Schmutzler mail at adrianschmutzler.de
Fri Jul 19 15:09:41 EDT 2019

Hi all,

when going through the MAC address setup in 02_network of the ramips target, I found some entries like the following:

	lan_mac=$(cat /sys/class/net/eth0/address)

	lan_mac=$(cat /sys/class/net/eth0/address)

Even the default case does that:
	lan_mac=$(cat /sys/class/net/eth0/address)
	wan_mac=$(macaddr_add "$lan_mac" 1)

I do not really see the point in setting the lan_mac to eth0 address here:
In the end, this will create an entry like:

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr 'aa:bb:cc:dd:ee:ff'

So, if the address of eth0 is already set, shouldn't eth0.1 just inherit it anyway?

Note that, if I went through the code correctly, it won't set the address of the lan bridge directly. Just eth0.1:

To me, this looks superfluous.

Am I getting something wrong here?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190719/336b4a3d/attachment.sig>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list