wifi-scripts: ucode: set default wildcard mac for wifi-station

When creating the PSK file, the old script sets `mac` to
`00:00:00:00:00:00` when `mac` is not specified (see [here][1]),
creating hostapd configuration lines like:

  vlanid=10 00:00:00:00:00:00 MyStrongPassword

That matches any MAC address (a wildcard). The `ucode` script alternative
misses the default, so set it.

[1]: 9c26d14489/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh (L428)

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Oldřich Jedlička 2025-07-29 10:10:58 +02:00 committed by Felix Fietkau
parent a8e3bff523
commit 2146f5c31f
2 changed files with 4 additions and 1 deletions

View File

@ -233,6 +233,8 @@ function setup() {
case 'link':
case 'ap':
has_ap = true;
for (let _, sta in v.stas)
validate('station', sta.config);
// fallthrough
case 'sta':
case 'adhoc':

View File

@ -6,7 +6,8 @@
"properties": {
"mac": {
"description": "The stations MAC",
"type": "string"
"type": "string",
"default": "00:00:00:00:00:00"
},
"key": {
"description": "The passphrase that shall be used",