On parsing jshn "normalize" the entry of any non alphanumeric char to
'_'. This resulted in the secanrio where the data passed by board.json
with entry 'network-device' being converted to 'network_device', and the
system still expecting data with the original 'network-device'.
To fix this, changes needs to be done in multiple place. Any function in
core uci-defaults.sh that expect 'network-device' needs to be changed to
'network_device' and here in netifd core, we need to switch to use
'network_device' directly to prevent any conflict with jshn conversion.
The issue was exposed by commit
4ebba8a05d09 ("realtek: add support for
HPE 1920-8g-poe+") in openwrt core where board_config_load call from
03_gpio introduced the key normalization by jshn.
board.json is not considered stable and is not migrated on sysupgrade
but actually recreated with up to date data, hence no migration or
special handling are needed and the entry can be directly changed.
Ref: https://forum.openwrt.org/t/57875/2589
Ref: https://github.com/openwrt/openwrt/pull/13622
Reported-by: Michael 'ASAP' Weinrich <michael@a5ap.net>
Fixes: 42c48866f1c1 ("config: parse default mac address from board.json")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>