diff mbox

BSD: Define WPA_KEY_RSC_LEN if it doesn't exist for BIG ENDIAN machines.

Message ID 569E583D.7040002@marples.name
State Changes Requested
Headers show

Commit Message

Roy Marples Jan. 19, 2016, 3:37 p.m. UTC
commit 7e86888cedffe270ff3509aca68253bb33decae9
Author: Roy Marples <roy@marples.name>
Date:   Tue Jan 19 15:34:56 2016 +0000

    Define WPA_KEY_RSC_LEN if it doesn't exist for BIG ENDIAN machines.
    
    Signed-off-by: Roy Marples <roy@marples.name>

Comments

Jouni Malinen Feb. 5, 2016, 10:33 a.m. UTC | #1
On Tue, Jan 19, 2016 at 03:37:33PM +0000, Roy Marples wrote:

>     Define WPA_KEY_RSC_LEN if it doesn't exist for BIG ENDIAN machines.

Why would it not exist? driver_bsd.c includes common/wpa_common.h which
defines this.
Roy Marples Feb. 5, 2016, 11:15 a.m. UTC | #2
On 05/02/2016 10:33, Jouni Malinen wrote:
> On Tue, Jan 19, 2016 at 03:37:33PM +0000, Roy Marples wrote:
> 
>>     Define WPA_KEY_RSC_LEN if it doesn't exist for BIG ENDIAN machines.
> 
> Why would it not exist? driver_bsd.c includes common/wpa_common.h which
> defines this.

Good question. At the time the patch was written (over 5 years ago), it
seems that common/wpa_common.h was not included in driver_bsd.c - at
least in NetBSD.

So I widthdraw this patch for consideration. Sorry about that.

Roy
Jouni Malinen Feb. 5, 2016, 2:20 p.m. UTC | #3
On Fri, Feb 05, 2016 at 11:15:40AM +0000, Roy Marples wrote:
> On 05/02/2016 10:33, Jouni Malinen wrote:
> > On Tue, Jan 19, 2016 at 03:37:33PM +0000, Roy Marples wrote:
> >>     Define WPA_KEY_RSC_LEN if it doesn't exist for BIG ENDIAN machines.
> > 
> > Why would it not exist? driver_bsd.c includes common/wpa_common.h which
> > defines this.
> 
> Good question. At the time the patch was written (over 5 years ago), it
> seems that common/wpa_common.h was not included in driver_bsd.c - at
> least in NetBSD.

Yeah, it was broken on big endian.. And fixed 5.1 years ago :) by this
commit:
http://w1.fi/cgit/hostap/commit/?id=9f2951d2fd53a5d13a23e976292020f5dc698abc
diff mbox

Patch

diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 53d7e58..ce5ec0b 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -684,6 +684,9 @@  bsd_get_seqnum(const char *ifname, void *priv, const u8 *addr, int idx,
 	}
 
 #ifdef WORDS_BIGENDIAN
+#ifndef WPA_KEY_RSC_LEN
+#define WPA_KEY_RSC_LEN 8
+#endif
 	{
 		/*
 		 * wk.ik_keytsc is in host byte order (big endian), need to