diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2008-08-12 19:51:20 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2008-08-12 19:51:20 +0000 |
commit | c62b4649d45dd791966395d51a81465d216be52f (patch) | |
tree | e7d8bb53a8209bf66c466f291800e54709125dd8 /sys | |
parent | cfceb85c4117431ab482fc7e0344332d0e674529 (diff) |
reserves the correct number of bytes in ieee80211_send_4way_msg2().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_pae_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_pae_output.c b/sys/net80211/ieee80211_pae_output.c index 2d1f5bc4173..6d307870996 100644 --- a/sys/net80211/ieee80211_pae_output.c +++ b/sys/net80211/ieee80211_pae_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_pae_output.c,v 1.10 2008/08/12 19:34:35 damien Exp $ */ +/* $OpenBSD: ieee80211_pae_output.c,v 1.11 2008/08/12 19:51:19 damien Exp $ */ /*- * Copyright (c) 2007,2008 Damien Bergamini <damien.bergamini@free.fr> @@ -321,7 +321,9 @@ ieee80211_send_4way_msg2(struct ieee80211com *ic, struct ieee80211_node *ni, u_int8_t *frm; m = ieee80211_get_eapol_key(M_DONTWAIT, MT_DATA, - 2 + 48); + (ni->ni_rsnprotos == IEEE80211_PROTO_WPA) ? + 2 + IEEE80211_WPAIE_MAXLEN : + 2 + IEEE80211_RSNIE_MAXLEN); if (m == NULL) return ENOMEM; key = mtod(m, struct ieee80211_eapol_key *); |