From c62b4649d45dd791966395d51a81465d216be52f Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Tue, 12 Aug 2008 19:51:20 +0000 Subject: reserves the correct number of bytes in ieee80211_send_4way_msg2(). --- sys/net80211/ieee80211_pae_output.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/net80211') 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 @@ -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 *); -- cgit v1.2.3