Hey Sam,

 

I’ve sent a pull-request for the fix. Would you mind checking that it does not 
break your FreeBSD build?

 

Kind regards,
Fugro Intersite B.V.

Michel Stam
Embedded System Engineer

Telephone: +31 (0)70 31 70575 / Fax: +31 (0)70 31 11890
E-mail: [email protected] / Website: www.fugro.com
Address: Dillenburgsingel 69, 2263 HW Leidschendam /
P.O. Box 154, 2260 AD Leidschendam, The Netherlands
Trade Register Nr: 34048179 / VAT Nr: NL005621409B24



From: Devel [mailto:[email protected]] On Behalf Of Sam Leffler
Sent: Wednesday, January 29, 2014 10:28 PM
To: devel
Subject: Re: meshd-nl80211 won't authenticate (process_mgmt_frame failed)

 

sys/endian.h on bsd systems includes machine/endian.h where the target settings 
are located.  You can inspect freebsd code here:

 

http://svnweb.freebsd.org/base/head/sys/sys/

 

On Wed, Jan 29, 2014 at 12:48 PM, Michel Stam <[email protected]> wrote:

Hello Francois,

I took a quick look at the settings for my compiler, and it seems that the 
__BYTE_ORDER and __LITTLE_ENDIAN defines are #define'd in endian.h on Linux 
systems.
The problem is that this is not compatible with NetBSD/OpenBSD/FreeBSD. The 
endian.h include does not seem to exist there.
Some posts suggest that this is sys/endian.h, but I cannot say for sure, and I 
do not have a FreeBSD system to check this.

Can someone tell me where these macros reside in FreeBSD? I'll send a pull 
request with a patch that should work with Linux and FreeBSD.

Cheers,

Michel

 

On 01/29/2014 08:54 PM, François Gervais wrote:

        Hi, 

          

        We found the problem. It was a little/big endianness problem. 

          

        It seems that with our cross-compile toolchain __BYTE_ORDER == 
__LITTLE_ENDIAN is not true even if the system is little endian. Probably one 
of both of these are not defined or not defined correctly. This caused the 
wrong function to be used in ieee802_11.h. 

          

        This in turn caused 

          

        frame_control = ieee_order(frame->frame_control); 

          

        to invert bytes. 

          

        That's it. I hope this didn't create too much noise on the mailing 
list. 

          

        Francois 

          

                On January 29, 2014 at 9:44 AM François Gervais 
<[email protected]> <mailto:[email protected]>  wrote: 

                Hi, 

                  

                We're trying to create a secure mesh but the meshd-nl80211 tool 
from authsae fails to authenticate the nodes. 

                  

                With the default debug messages with get the following: 

                  

                NL80211_CMD_NEW_PEER_CANDIDATE(1390949875.361066)
                libsae: process_mgmt_frame failed
                EAFNOSUPPORT

                  

                We added a little more debug to identify why process_mgmt_frame 
fails and we saw that it's because the STYPE from frame_control equals 0. It 
might mean something to somebody here. 

                  

                  

                  

                  

                Here's what we do on both nodes to start the mesh network: 

                  

                # iw dev wlan0 interface add mesh0 type mp 

                # ifconfig mesh0 up  

                # meshd-nl80211 -c authsae.conf 

                  

                Our configuration is the following: 

                  

                Wireless adapter: WN722N/WN821N 

                Driver: ath9k_htc (backports-3.12-1) 

                iw: 3.13 

                  

                Our config file: 

                /* this is a comment */
                authsae:
                {
                sae:
                {
                debug = 65535;
                password = "meshpasswd";
                group = [19, 26, 21, 25, 20];
                blacklist = 5;
                thresh = 5;
                lifetime = 3600;
                };
                meshd:
                {
                meshid = "mesh_test";
                interface = "mesh0";
                band = "11g";
                channel = 1;
                htmode = "none";
                mcast-rate = 12;
                };
                };

                Any idea why this fails?

        
          

         

        _______________________________________________
        Devel mailing list
        [email protected]
        http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

 


_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

 

_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to