[OpenWrt-Devel] [PATCH 3/3] mac80211: allow encrypted mesh with wpa_supplicant

Daniel Golle daniel at makrotopia.org
Mon Mar 23 13:13:30 EDT 2015


Allow using wpa_supplicant instead of authsae when joining mesh
networks with encryption. authsae is still prefered if installed.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../mac80211/files/lib/netifd/wireless/mac80211.sh     | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 9526300..7f70de5 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -588,23 +588,27 @@ mac80211_setup_vif() {
 
 	case "$mode" in
 		mesh)
-			for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do
-				json_get_var mp_val "$var"
-				[ -n "$mp_val" ] && iw dev "$ifname" set mesh_param "$var" "$mp_val"
-			done
-
-			# authsae
+			# authsae or wpa_supplicant
 			json_get_vars key
 			if [ -n "$key" ]; then
 				if [ -e "/lib/wifi/authsae.sh" ]; then
 					. /lib/wifi/authsae.sh
 					authsae_start_interface || failed=1
 				else
-					wireless_setup_vif_failed AUTHSAE_NOT_INSTALLED
+					wireless_vif_parse_encryption
+					mac80211_setup_supplicant || failed=1
+				fi
+				if [ $failed = 1 ]; then
+					wireless_setup_vif_failed MESH_SAE_FAILED
 					json_select ..
 					return
 				fi
 			fi
+
+			for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do
+				json_get_var mp_val "$var"
+				[ -n "$mp_val" ] && iw dev "$ifname" set mesh_param "$var" "$mp_val"
+			done
 		;;
 		adhoc)
 			wireless_vif_parse_encryption
-- 
2.3.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list