[OpenWrt-Devel] [LEDE-DEV] [PATCH] mac80211: pass hostapd control socket to mesh-mode supplicant

Daniel Golle daniel at makrotopia.org
Thu Apr 19 07:04:45 EDT 2018


Hi Daniel

On Thu, Apr 19, 2018 at 12:52:56PM +0200, daniel wrote:
> This patch breaks encrypted mesh mode.

Yes, I reverted it yesterday afternoon...

> 
> I agree, there is still something wrong with the logic when using encrypted mesh.

Yes, and that's on my agenda for tonight (fixing /lib/netifd/wireless/mac80211.sh)

> Also the setting of the mesh parameters fails, because nl80211_mesh_join must
> happen before nl80211_update_mesh_config. This results in these errors:
> ---
> netifd: radio1 (6314): command failed: Link has been severed (-67)
> ---
> Originating from net/wireless/nl80211.c:nl80211_update_mesh_config():6133
> through calling in 'iw set mesh_params' at /lib/netifd/wireless/mac80211.sh:678
> 
> When using mesh without encryption this is not an issue, because
> 'iw mesh_join' is called before 'iw set mesh_params'
> in '/lib/netifd/wireless/mac80211.sh:678
> 
> With encryption the setting of the parameters need to happen after
> wpa_supplicant triggered nl80211_mesh_join.
> 
> But I don't know how to solve this properly yet either...

Making wpa_supplicant set the mesh parameters (it already does that,
but uses non-configurable default values). I added support to at least
handle mesh_fwding, because it was what I needed for my use-case, see

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=ff8df2b3f9c161edc3ab543bdbeb04a9fb45c959


Cheers


Daniel

> 
> On 04/13/2018 01:41 AM, Daniel Golle wrote:
> > Unlike when operating in Ad-Hoc mode, we apparently need to pass the
> > hostapd control socket interface to wpa_supplicant when using 802.11s
> > mesh mode.
> > 
> > There also seems to still be something wrong with the logic setting
> > channel and (v)htmode parameters when using AP + mesh...
> > 
> > Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> > ---
> >  package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> > index bf9d52ae42..3a1d475a5c 100644
> > --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> > +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> > @@ -633,7 +633,7 @@ mac80211_setup_vif() {
> >  			if [ -n "$key" ]; then
> >  				wireless_vif_parse_encryption
> >  				freq="$(get_freq "$phy" "$channel")"
> > -				mac80211_setup_supplicant_noctl || failed=1
> > +				mac80211_setup_supplicant || failed=1
> >  			else
> >  				json_get_vars mesh_id mcast_rate
> >  
> > 
> 
> -- 
> Regards
> 
> Daniel Danzberger
> embeDD GmbH, Alter Postplatz 2, CH-6370 Stans
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
_______________________________________________
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