[LEDE-DEV] [PATCH] bcm53xx: fix LAN MAC address for devices that use eth2 originally
Felix Fietkau
nbd at nbd.name
Wed Feb 1 01:43:30 PST 2017
On 2017-01-31 13:53, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
>
> We override default Ethernet interface with eth0 which often uses random
> MAC due to missing proper NVRAM entry. Fix this by manually assigning
> MAC in the config.
>
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
> ---
> target/linux/bcm53xx/base-files/etc/board.d/02_network | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network
> index 672b1349df..3c19b574b8 100755
> --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network
> +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network
> @@ -50,6 +50,12 @@ netgear,r8500)
> ifname=eth0
> ucidef_add_switch "switch0" \
> "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@$ifname"
> +
> + # These devices should use eth2 and their eth0 interface often has no
> + # MAC assigned. Manually assign eth2's MAC to the LAN.
> + et2macaddr="$(echo $(nvram get et2macaddr))"
Why $(echo $(...))?
- Felix
More information about the Lede-dev
mailing list