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]> 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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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

Reply via email to