-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[change] OpenWrt: updated WPA enterprise settings #291 #292
Conversation
c45cf89
to
0c83f93
Compare
- Generate "auth_sever", "auth_port" and "auth_secret" options from "server", "port" and "key" properties - Set "acct_secret" to the value of "key" if it is not configured in NetJSON - Add new options: "acct_inverval", "dae_client", "dae_port", "dae_secret" Closes #291
0c83f93
to
91d8e8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I want to get a chance to review the code a bit more before merging.
…t option in OpenWrt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, see my comment below.
tests/openwrt/test_encryption.py
Outdated
@@ -368,6 +383,9 @@ def test_render_wpa3_enterprise(self): | |||
|
|||
def test_parse_wpa3_enterprise(self): | |||
o = OpenWrt(native=self._wpa3_enterprise_ap_uci) | |||
from pprint import pprint | |||
|
|||
pprint(dict(o.config)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems a leftover
for option in ['server', 'port']: | ||
if f'auth_{option}' in settings: | ||
settings[option] = settings.pop(f'auth_{option}') | ||
if settings.get('acct_port'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not if 'acct_port' in settings
? Why using get
here? Is it on purpose?
uci['auth_secret'] = encryption['key'] | ||
if not encryption.get('acct_secret'): | ||
uci['acct_secret'] = encryption['key'] | ||
if encryption.get('acct_server_port'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
if option in encryption: | ||
uci[f'auth_{option}'] = encryption[option] | ||
uci['auth_secret'] = encryption['key'] | ||
if not encryption.get('acct_secret'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Closes #291