wpa_supplicant: review fixes

This commit is contained in:
Maximilian Bosch 2021-04-16 13:28:01 +02:00
parent 08ced9d67f
commit 84670bf681
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
2 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@
with lib;
let
package = if cfg.allowDeclarativeAndImperativeNetworks
package = if cfg.allowAuxiliaryImperativeNetworks
then pkgs.wpa_supplicant_ro_ssids
else pkgs.wpa_supplicant;
@ -51,7 +51,7 @@ in {
description = "Force a specific wpa_supplicant driver.";
};
allowDeclarativeAndImperativeNetworks = mkEnableOption "support for imperative & declarative networks" // {
allowAuxiliaryImperativeNetworks = mkEnableOption "support for imperative & declarative networks" // {
description = ''
Whether to allow configuring networks "imperatively" (e.g. via
<package>wpa_supplicant_gui</package>) and declaratively via
@ -247,7 +247,7 @@ in {
path = [ package ];
script = let
configStr = if cfg.allowDeclarativeAndImperativeNetworks
configStr = if cfg.allowAuxiliaryImperativeNetworks
then "-c /etc/wpa_supplicant.conf -I ${configFile}"
else "-c ${configFile}";
in ''

View file

@ -56,7 +56,7 @@ index 77c326df5..d5ed051b9 100644
for (ssid = config->ssid; ssid; ssid = ssid->next) {
- if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary)
+ if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary || ssid->ro == 1)
+ if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary || ssid->ro)
continue; /* do not save temporary networks */
if (wpa_key_mgmt_wpa_psk(ssid->key_mgmt) && !ssid->psk_set &&
!ssid->passphrase)