Skip to content

Commit

Permalink
luci-mod-network: Add wireless.encryption.ppsk option
Browse files Browse the repository at this point in the history
- `wireless.encryption.ppsk` option is `form.Flag` option that enables hostapd Private Pre-Shared Key (PPSK) feature.

- Private Pre-Shared Key (PPSK) is a hostapd feature that allows use of different Pre-Shared Key for each STA MAC address. Private PSKs is stored on RADIUS server.

- Private PSK feature is available starting from openwrt/openwrt@d12eb10 (PR openwrt/openwrt#3509).

This commit fixes issues found in openwrt#4513

Signed-off-by: Alexander Georgievskiy <galeksandrp@gmail.com>
  • Loading branch information
galeksandrp committed Apr 8, 2023
1 parent 58323e4 commit f278600
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1400,25 +1400,24 @@ return view.extend({
}


o = ss.taboption('encryption', form.Flag, 'ppsk', _('Enable private psk key (PPSK)'), _('STAs can have a private and independent key mapped to their MAC and the shared key won`t work. If the mac is not in the radius user list, then they can optionally connect if a default entry is configured. It requires radius server to work.'));
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk2', 'psk-mixed'] });
o = ss.taboption('encryption', form.Flag, 'ppsk', _('Enable Private PSK (PPSK)'), _('Private Pre-Shared Key (PPSK) is a hostapd feature that allows use of different Pre-Shared Key for each STA MAC address. Private PSKs is stored on RADIUS server.'));
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'] });

o = ss.taboption('encryption', form.Value, 'auth_server', _('RADIUS Authentication Server'));
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
o.depends({ ppsk: '1' });
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] });
o.rmempty = true;
o.datatype = 'host(0)';

o = ss.taboption('encryption', form.Value, 'auth_port', _('RADIUS Authentication Port'));
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
o.depends({ ppsk: '1' });
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['1'] });
o.rmempty = true;
o.datatype = 'port';
o.placeholder = '1812';

o = ss.taboption('encryption', form.Value, 'auth_secret', _('RADIUS Authentication Secret'));
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
o.depends({ ppsk: '1' });
o.rmempty = true;
o.password = true;

Expand Down Expand Up @@ -1492,10 +1491,7 @@ return view.extend({


o = ss.taboption('encryption', form.Value, '_wpa_key', _('Key'));
o.depends('encryption', 'psk');
o.depends('encryption', 'psk2');
o.depends('encryption', 'psk+psk2');
o.depends('encryption', 'psk-mixed');
add_dependency_permutations(o, { encryption: ['psk', 'psk2', 'psk+psk2', 'psk-mixed'], ppsk: ['0']});
o.depends('encryption', 'sae');
o.depends('encryption', 'sae-mixed');
o.datatype = 'wpakey';
Expand Down

0 comments on commit f278600

Please sign in to comment.