svn commit: r192037 - projects/mesh11s/sys/net80211

Rui Paulo rpaulo at FreeBSD.org
Wed May 13 09:03:55 UTC 2009


Author: rpaulo
Date: Wed May 13 09:03:54 2009
New Revision: 192037
URL: http://svn.freebsd.org/changeset/base/192037

Log:
  Add a meshqosframe_addr struct for storing mesh data packets.
  This fixes a stack corruption problem the previous commit introduced.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/mesh11s/sys/net80211/ieee80211.h
  projects/mesh11s/sys/net80211/ieee80211_input.c

Modified: projects/mesh11s/sys/net80211/ieee80211.h
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211.h	Wed May 13 08:50:13 2009	(r192036)
+++ projects/mesh11s/sys/net80211/ieee80211.h	Wed May 13 09:03:54 2009	(r192037)
@@ -107,6 +107,20 @@ struct ieee80211_qosframe_addr4 {
 	uint8_t		i_qos[2];
 } __packed;
 
+struct ieee80211_meshqosframe_addr4 {
+	uint8_t		i_fc[2];
+	uint8_t		i_dur[2];
+	uint8_t		i_addr1[IEEE80211_ADDR_LEN];
+	uint8_t		i_addr2[IEEE80211_ADDR_LEN];
+	uint8_t		i_addr3[IEEE80211_ADDR_LEN];
+	uint8_t		i_seq[2];
+	uint8_t		i_addr4[IEEE80211_ADDR_LEN];
+	uint8_t		i_qos[2];
+	uint8_t		i_mflags;	/* address extension flags */
+	uint8_t		i_mttl;		/* mesh ttl */
+	uint8_t		i_mseq[4];	/* mesh sequence no */
+} __packed;
+
 #define	IEEE80211_FC0_VERSION_MASK		0x03
 #define	IEEE80211_FC0_VERSION_SHIFT		0
 #define	IEEE80211_FC0_VERSION_0			0x00

Modified: projects/mesh11s/sys/net80211/ieee80211_input.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_input.c	Wed May 13 08:50:13 2009	(r192036)
+++ projects/mesh11s/sys/net80211/ieee80211_input.c	Wed May 13 09:03:54 2009	(r192037)
@@ -226,7 +226,7 @@ ieee80211_deliver_data(struct ieee80211v
 struct mbuf *
 ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen)
 {
-	struct ieee80211_qosframe_addr4 wh;	/* Max size address frames */
+	struct ieee80211_meshqosframe_addr4 wh;	/* Max size address frames */
 	struct ether_header *eh;
 	struct llc *llc;
 


More information about the svn-src-projects mailing list