[PATCH/RFC 15/18] sample conf: add description for new mesh options

Bob Copeland me at bobcopeland.com
Mon Jul 14 01:19:20 EDT 2014


From: Thomas Pedersen <thomas at noack.us>

Modify sample wpa_supplicant.conf file to include user_mpm option
and new network mode (5), including open and secure mesh networking.

Signed-off-by: Javier Lopez <jlopex at gmail.com>
Signed-off-by: Jason Mobarak <x at jason.mobarak.name>
Signed-hostap: Thomas Pedersen <thomas at noack.us>
---
 wpa_supplicant/config.c            | 12 ++++++++++++
 wpa_supplicant/config_file.c       |  2 ++
 wpa_supplicant/wpa_supplicant.conf | 26 ++++++++++++++++++++++++++
 3 files changed, 40 insertions(+)

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 0b80ce2..b1069ce 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -677,6 +677,18 @@ static char * wpa_config_write_key_mgmt(const struct parse_data *data,
 	}
 #endif /* CONFIG_WPS */
 
+#ifdef CONFIG_SAE
+	if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
+		ret = os_snprintf(pos, end - pos, "%sSAE",
+				  pos == buf ? "" : " ");
+		if (ret < 0 || ret >= end - pos) {
+			end[-1] = '\0';
+			return buf;
+		}
+		pos += ret;
+	}
+#endif /* CONFIG_SAE */
+
 	if (pos == buf) {
 		os_free(buf);
 		buf = NULL;
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index f1880cd..4376412 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -743,6 +743,8 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
 	INT(update_identifier);
 #endif /* CONFIG_HS20 */
 
+	STR(mesh_ht_mode);
+
 #undef STR
 #undef INT
 #undef INT_DEF
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index 2a0dc20..f0c8636 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -114,6 +114,15 @@ eapol_version=1
 # networks are found, a new IBSS or AP mode network is created.
 ap_scan=1
 
+# MPM residency
+# By default, wpa_supplicant implements the mesh peering manager (MPM)
+# for an open mesh.  However, if the driver can implement the MPM, you
+# may set this to 0 to use the driver version.
+# When AMPE is enabled, the wpa_supplicant MPM is always used.
+# 0: MPM lives in the driver
+# 1: wpa_supplicant provides an MPM which handles peering (default)
+user_mpm=1
+
 # EAP fast re-authentication
 # By default, fast re-authentication is enabled for all EAP methods that
 # support it. This variable can be used to disable fast re-authentication.
@@ -1285,6 +1294,23 @@ network={
 	psk="secret passphrase"
 }
 
+# open mesh network
+network={
+	ssid="test mesh"
+	mode=5
+	frequency=2437
+	key_mgmt=NONE
+}
+
+# secure (SAE + AMPE) network
+network={
+	ssid="secure mesh"
+	mode=5
+	frequency=2437
+	key_mgmt=SAE
+	psk="very secret passphrase"
+}
+
 
 # Catch all example that allows more or less all configuration modes
 network={
-- 
2.0.0.rc2



More information about the HostAP mailing list