From: Peter Meerwald <[email protected]>

when neither EAP nor a passphrase is configured, the
security should default to 'none', not 'unknown'

otherwise, unsecured wifi networks can not be provisioned
---
 src/config.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/config.c b/src/config.c
index a4c117e..5bf5cf1 100644
--- a/src/config.c
+++ b/src/config.c
@@ -698,7 +698,16 @@ static bool load_service(GKeyFile *keyfile, const char 
*group,
 
                } else
                        service->security = CONNMAN_SERVICE_SECURITY_PSK;
-       }
+       } else if (str) {
+
+               if (security != CONNMAN_SERVICE_SECURITY_NONE)
+                       connman_info("Mismatch no security and "
+                                       "setting %s = %s",
+                                       SERVICE_KEY_SECURITY, str);
+
+                       service->security = CONNMAN_SERVICE_SECURITY_NONE;
+       } else
+                       service->security = CONNMAN_SERVICE_SECURITY_NONE;
 
        service->config_ident = g_strdup(config->ident);
        service->config_entry = g_strdup_printf("service_%s", service->ident);
-- 
1.7.9.5

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to