• Sungbo Eo's avatar
    base-files: config_generate: split macaddr with multiple ifaces · 7863a8f3
    Sungbo Eo authored
    netifd does not handle network.@device[x].name properly if it
    contains multiple ifaces separated by spaces. Due to this, board.d
    lan_mac setup does not work if multiple ifaces are set to LAN by
    To fix this, create a device node for each member iface when
    running config_generate instead. Those are named based on the
    member ifname:
      ucidef_set_interface_lan "eth0 eth1.1"
      ucidef_set_interface_macaddr "lan" "yy:yy:yy:yy:yy:01"
    will return
      config device 'lan_eth0_dev'
            option name 'eth0'
            option macaddr 'yy:yy:yy:yy:yy:01'
      config device 'lan_eth1_1_dev'
            option name 'eth1.1'
            option macaddr 'yy:yy:yy:yy:yy:01'
    ref: https://github.com/openwrt/openwrt/pull/2542
    Signed-off-by: default avatarSungbo Eo <mans0n@gorani.run>
    [always use new scheme, extend description, change commit title]
    Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
    (cherry picked from commit 298814e6)