Skip to content

Commit

Permalink
luci-mod-network: add ppsk option (support for private psk)
Browse files Browse the repository at this point in the history
This PR allows a user using luci to enable a private psk, where each
station may have it's own psk or use a common psk if it is not defined.

Depends on PR 3509: openwrt/openwrt#3509

Signed-off-by: Manuel Giganto <mgigantoregistros@gmail.com>
  • Loading branch information
Manuel Giganto committed Oct 12, 2020
1 parent 0d0816c commit f9d8d03
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1320,18 +1320,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.Value, 'auth_server', _('Radius-Authentication-Server'));
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
o.depends({ ppsk: '1' });
o.rmempty = true;
o.datatype = 'host(0)';

o = ss.taboption('encryption', form.Value, 'auth_port', _('Radius-Authentication-Port'), _('Default %d').format(1812));
add_dependency_permutations(o, { mode: ['ap', 'ap-wds'], encryption: ['wpa', 'wpa2', 'wpa3', 'wpa3-mixed'] });
o.depends({ ppsk: '1' });
o.rmempty = true;
o.datatype = 'port';

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 @@ -1368,7 +1374,7 @@ return view.extend({

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

0 comments on commit f9d8d03

Please sign in to comment.