add property that allows disabling MPSK

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2025-03-24 07:50:14 +01:00
parent 5a39d237a4
commit d8260f8ff3
6 changed files with 35 additions and 0 deletions

View File

@@ -733,6 +733,8 @@ let services = {
if (!interface.ssids)
continue;
for (let ssid in interface.ssids) {
if (!ssid?.enhanced-mpsk)
continue;
if ((ssid?.encryption?.proto && type(ssid.encryption.proto) == 'string' &&
ssid.encryption.proto == "mpsk-radius") ||
(type(ssid.multi_psk) == 'bool' && ssid.multi_psk))

View File

@@ -137,6 +137,11 @@ properties:
maximum: 20
encryption:
$ref: "https://ucentral.io/schema/v1/interface/ssid/encryption/"
enhanced-mpsk:
description:
Optinally disable MPSK
type: boolean
default: true
multi-psk:
anyOf:
- type: array

View File

@@ -5857,6 +5857,20 @@ function instantiateInterfaceSsid(location, value, errors) {
obj.encryption = instantiateInterfaceSsidEncryption(location + "/encryption", value["encryption"], errors);
}
function parseEnhancedMpsk(location, value, errors) {
if (type(value) != "bool")
push(errors, [ location, "must be of type boolean" ]);
return value;
}
if (exists(value, "enhanced-mpsk")) {
obj.enhanced_mpsk = parseEnhancedMpsk(location + "/enhanced-mpsk", value["enhanced-mpsk"], errors);
}
else {
obj.enhanced_mpsk = true;
}
function parseMultiPsk(location, value, errors) {
function parseVariant0(location, value, errors) {
if (type(value) == "array") {

View File

@@ -1658,6 +1658,11 @@
}
}
},
"enhanced-mpsk": {
"description": "Optinally disable MPSK",
"type": "boolean",
"default": true
},
"multi-psk": {
"anyOf": [
{

View File

@@ -2126,6 +2126,10 @@
"encryption": {
"$ref": "#/$defs/interface.ssid.encryption"
},
"enhanced-mpsk": {
"type": "boolean",
"default": true
},
"multi-psk": {
"anyOf": [
{

View File

@@ -2429,6 +2429,11 @@
"encryption": {
"$ref": "#/$defs/interface.ssid.encryption"
},
"enhanced-mpsk": {
"description": "Optinally disable MPSK",
"type": "boolean",
"default": true
},
"multi-psk": {
"anyOf": [
{