[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:
edimax,br-6475nd)
lan_mac=$(cat /sys/class/net/eth0/address)
...
hootoo,ht-tm02|\
loewe,wmdr-143n|\
unbranded,a5-v11)
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:
https://github.com/openwrt/openwrt/blob/0f6b944c923537b9bc08da23f363b409d1e564b3/package/base-files/files/bin/config_generate#L88
To me, this looks superfluous.
Am I getting something wrong here?
Best
Adrian
-------------- 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
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list