diff mbox

hostapd patch review: 'hostapd: hostapd_cli can set wpa_key_mgmt to NONE value for open networks'

Message ID 84588AE9369A404CB964759F9219496419B6F1E1@IRSMSX105.ger.corp.intel.com
State Changes Requested
Headers show

Commit Message

Baudelet, Cedric July 10, 2014, 7:49 a.m. UTC
Dear all,

Could you please review following hostapd patch?

Thanks.

Best regards,

Cedric Baudelet

Author: Cedric Baudelet <cedric.baudelet@intel.com>
Date:   Thu Jul 3 18:04:58 2014 +0200

    hostapd: hostapd_cli can set wpa_key_mgmt to NONE value for open networks

    Updated hostapd_config_parse_key_mgmt() function to set
    val to WPA_KEY_MGMT_NONE is wpa_key_mgmt NONE value is
    receive through hostapd_cli.

    Signed-off-by: Cedric Baudelet <cedric.baudelet@intel.com>

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

Comments

Jouni Malinen Oct. 12, 2014, 3:42 p.m. UTC | #1
On Thu, Jul 10, 2014 at 07:49:15AM +0000, Baudelet, Cedric wrote:
> Could you please review following hostapd patch?

>     hostapd: hostapd_cli can set wpa_key_mgmt to NONE value for open networks
> 
>     Updated hostapd_config_parse_key_mgmt() function to set
>     val to WPA_KEY_MGMT_NONE is wpa_key_mgmt NONE value is
>     receive through hostapd_cli.

What would this be used for? I'm not sure I understand why it would be
useful to set bss->wpa_key_mgmt to WPA_KEY_MGMT_NONE. If you do not want
WPA/WPA2, you can set wpa=0. Leaving wpa to non-zero (i.e., enabled) and
setting wpa_key_mgmt to WPA_KEY_MGMT_NONE would likely result in
undefined behavior and pretty strange WPA/RSN IE contents.
diff mbox

Patch

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index be40398..2a82187 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -660,6 +660,8 @@  static int hostapd_config_parse_key_mgmt(int line, const char *value)
                *end = '\0';
                if (os_strcmp(start, "WPA-PSK") == 0)
                        val |= WPA_KEY_MGMT_PSK;
+               else if (os_strcmp(start, "NONE") == 0)
+                       val |= WPA_KEY_MGMT_NONE;
                else if (os_strcmp(start, "WPA-EAP") == 0)
                        val |= WPA_KEY_MGMT_IEEE8021X;
 #ifdef CONFIG_IEEE80211R