From 49c1cac85ca1ff4bbe8961047bbf7f94ffbec5da Mon Sep 17 00:00:00 2001 From: damien Date: Fri, 15 Aug 2008 08:15:27 +0000 Subject: [PATCH] use LLC_SNAPFRAMELEN here too. --- sys/net80211/ieee80211_output.c | 8 ++++---- sys/net80211/ieee80211_pae_output.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 60c2ed4de77..46f873a6156 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_output.c,v 1.70 2008/08/12 19:56:59 damien Exp $ */ +/* $OpenBSD: ieee80211_output.c,v 1.71 2008/08/15 08:15:27 damien Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */ /*- @@ -547,7 +547,7 @@ ieee80211_encap(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node **pni) hdrlen = sizeof(struct ieee80211_frame); addqos = 0; } - m_adj(m, sizeof(struct ether_header) - sizeof(struct llc)); + m_adj(m, sizeof(struct ether_header) - LLC_SNAPFRAMELEN); llc = mtod(m, struct llc *); llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; llc->llc_control = LLC_UI; @@ -1181,7 +1181,7 @@ ieee80211_get_assoc_req(struct ieee80211com *ic, struct ieee80211_node *ni, u_int16_t capinfo; m = ieee80211_getmgmt(M_DONTWAIT, MT_DATA, - 2 + 2 + + 2 + 2 + ((reassoc == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) ? IEEE80211_ADDR_LEN : 0) + 2 + ni->ni_esslen + @@ -1251,7 +1251,7 @@ ieee80211_get_assoc_resp(struct ieee80211com *ic, struct ieee80211_node *ni, u_int8_t *frm; m = ieee80211_getmgmt(M_DONTWAIT, MT_DATA, - 2 + 2 + 2 + + 2 + 2 + 2 + 2 + min(rs->rs_nrates, IEEE80211_RATE_SIZE) + ((rs->rs_nrates > IEEE80211_RATE_SIZE) ? 2 + rs->rs_nrates - IEEE80211_RATE_SIZE : 0) + diff --git a/sys/net80211/ieee80211_pae_output.c b/sys/net80211/ieee80211_pae_output.c index 6d307870996..20610e5a186 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.11 2008/08/12 19:51:19 damien Exp $ */ +/* $OpenBSD: ieee80211_pae_output.c,v 1.12 2008/08/15 08:15:27 damien Exp $ */ /*- * Copyright (c) 2007,2008 Damien Bergamini @@ -235,7 +235,7 @@ ieee80211_get_eapol_key(int flags, int type, u_int pktlen) struct mbuf *m; /* reserve space for 802.11 encapsulation and EAPOL-Key header */ - pktlen += sizeof(struct ieee80211_frame) + sizeof(struct llc) + + pktlen += sizeof(struct ieee80211_frame) + LLC_SNAPFRAMELEN + sizeof(struct ieee80211_eapol_key); if (pktlen > MCLBYTES) @@ -248,7 +248,7 @@ ieee80211_get_eapol_key(int flags, int type, u_int pktlen) if (!(m->m_flags & M_EXT)) return m_free(m); } - m->m_data += sizeof(struct ieee80211_frame) + sizeof(struct llc); + m->m_data += sizeof(struct ieee80211_frame) + LLC_SNAPFRAMELEN; return m; } -- 2.20.1