aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-07-18 00:48:32 (GMT)
committerJouni Malinen <j@w1.fi>2010-07-18 00:48:32 (GMT)
commite9501a07c629ffb7e3448dae9189793b9031bc50 (patch)
treeea9483f662e058b714dd12bc669962cd7aeaac58 /src
parent79614ec55b942017eee43b34ba1b547528c05e73 (diff)
downloadhostap-e9501a07c629ffb7e3448dae9189793b9031bc50.zip
hostap-e9501a07c629ffb7e3448dae9189793b9031bc50.tar.gz
hostap-e9501a07c629ffb7e3448dae9189793b9031bc50.tar.bz2
FT: Fix RRB messages to use correct endianness
The pairwise cipher field is supposed to be little endian, but the message building functions did not swap the bytes on big endian hosts while the message processing functions did. Fix this by using little endian byte order in both places.
Diffstat (limited to 'src')
-rw-r--r--src/ap/wpa_auth_ft.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
index 0ab3fb4..9112f2b 100644
--- a/src/ap/wpa_auth_ft.c
+++ b/src/ap/wpa_auth_ft.c
@@ -1431,7 +1431,7 @@ static int wpa_ft_rrb_rx_pull(struct wpa_authenticator *wpa_auth,
wpa_hexdump_key(MSG_DEBUG, "FT: PMK-R1", r.pmk_r1, PMK_LEN);
wpa_hexdump(MSG_DEBUG, "FT: PMKR1Name", r.pmk_r1_name,
WPA_PMK_NAME_LEN);
- r.pairwise = pairwise;
+ r.pairwise = host_to_le16(pairwise);
if (aes_wrap(r1kh->key, (FT_R0KH_R1KH_RESP_DATA_LEN + 7) / 8,
r.nonce, resp.nonce) < 0) {
@@ -1734,7 +1734,7 @@ static void wpa_ft_generate_pmk_r1(struct wpa_authenticator *wpa_auth,
WPA_PMK_NAME_LEN);
os_get_time(&now);
WPA_PUT_LE32(f.timestamp, now.sec);
- f.pairwise = pairwise;
+ f.pairwise = host_to_le16(pairwise);
if (aes_wrap(r1kh->key, (FT_R0KH_R1KH_PUSH_DATA_LEN + 7) / 8,
f.timestamp, frame.timestamp) < 0)
return;