Support for DPP key-type while saving supplicant configuration

Message ID e0ef93bba6004379996e6e640aecd3f2@comcast.com
State Accepted
Headers show
Series
  • Support for DPP key-type while saving supplicant configuration
Related show

Commit Message

Damodaran, Rohit (Contractor) Dec. 5, 2018, 11:20 a.m.
In the existing code, there was no "DPP" string available to the DPP key management type for configuration parser of wpa supplicant. When the configuration is saved, the key management string was NULL in the wpa_supplicant config file. Adding support for DPP in key-type in key management.


Signed-off-by: Rohit Damodaran <Rohit_Damodaran@comcast.com>
---
 wpa_supplicant/config.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Jouni Malinen Dec. 17, 2018, 3:09 p.m. | #1
On Wed, Dec 05, 2018 at 11:20:43AM +0000, Damodaran, Rohit (Contractor) wrote:
> In the existing code, there was no "DPP" string available to the DPP key management type for configuration parser of wpa supplicant. When the configuration is saved, the key management string was NULL in the wpa_supplicant config file. Adding support for DPP in key-type in key management.

Thanks, applied.

Patch

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index c43960697..a05f5b432 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -1002,6 +1002,18 @@  static char * wpa_config_write_key_mgmt(const struct parse_data *data,
     }
 #endif /* CONFIG_SUITEB192 */
 
+#ifdef CONFIG_DPP
+    if (ssid->key_mgmt & WPA_KEY_MGMT_DPP) {
+        ret = os_snprintf(pos, end - pos, "%sDPP",
+                  pos == buf ? "" : " ");
+        if (os_snprintf_error(end - pos, ret)) {
+            end[-1] = '\0';
+            return buf;
+        }
+        pos += ret;
+    }
+#endif /*CONFIG_DPP */
+
 #ifdef CONFIG_FILS
     if (ssid->key_mgmt & WPA_KEY_MGMT_FILS_SHA256) {
         ret = os_snprintf(pos, end - pos, "%sFILS-SHA256",