aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/mikrotik
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/mikrotik')
-rwxr-xr-xtarget/linux/ath79/mikrotik/base-files/etc/board.d/02_network9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
index ee795c7496..7f8327f764 100755
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -21,8 +21,17 @@ ath79_setup_interfaces()
ath79_setup_macs()
{
local board="$1"
+ local lan_mac=""
+ local wan_mac=""
+ local label_mac=""
+ local mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)"
case "$board" in
+ *)
+ label_mac="$mac_base"
+ wan_mac="$mac_base"
+ lan_mac=$(macaddr_add $mac_base 1)
+ ;;
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac