|
|
@@ -1,6 +1,7 @@
|
|
|
#!/bin/sh
|
|
|
. /lib/netifd/netifd-wireless.sh
|
|
|
. /lib/netifd/hostapd.sh
|
|
|
+. /lib/functions/system.sh
|
|
|
|
|
|
init_wireless_driver "$@"
|
|
|
|
|
|
@@ -667,10 +668,12 @@ mac80211_prepare_vif() {
|
|
|
|
|
|
json_select ..
|
|
|
|
|
|
- [ -n "$macaddr" ] || {
|
|
|
+ if [ -z "$macaddr" ]; then
|
|
|
macaddr="$(mac80211_generate_mac $phy)"
|
|
|
macidx="$(($macidx + 1))"
|
|
|
- }
|
|
|
+ elif [ "$macaddr" = 'random' ]; then
|
|
|
+ macaddr="$(macaddr_random)"
|
|
|
+ fi
|
|
|
|
|
|
json_add_object data
|
|
|
json_add_string ifname "$ifname"
|