Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156694840
D3769.id9019.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3769.id9019.diff
View Options
Index: sys/net80211/ieee80211_output.c
===================================================================
--- sys/net80211/ieee80211_output.c
+++ sys/net80211/ieee80211_output.c
@@ -1583,6 +1583,21 @@
#undef MC01
}
+void
+ieee80211_free_mbuf(struct mbuf *m)
+{
+ struct mbuf *next;
+
+ if (m == NULL)
+ return;
+
+ do {
+ next = m->m_nextpkt;
+ m->m_nextpkt = NULL;
+ m_freem(m);
+ } while ((m = next) != NULL);
+}
+
/*
* Fragment the frame according to the specified mtu.
* The size of the 802.11 header (w/o padding) is provided
@@ -1597,7 +1612,7 @@
{
struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_frame *wh, *whf;
- struct mbuf *m, *prev, *next;
+ struct mbuf *m, *prev;
u_int totalhdrsize, fragno, fragsize, off, remainder, payload;
u_int hdrspace;
@@ -1692,11 +1707,7 @@
return 1;
bad:
/* reclaim fragments but leave original frame for caller to free */
- for (m = m0->m_nextpkt; m != NULL; m = next) {
- next = m->m_nextpkt;
- m->m_nextpkt = NULL; /* XXX paranoid */
- m_freem(m);
- }
+ ieee80211_free_mbuf(m0->m_nextpkt);
m0->m_nextpkt = NULL;
return 0;
}
Index: sys/net80211/ieee80211_proto.h
===================================================================
--- sys/net80211/ieee80211_proto.h
+++ sys/net80211/ieee80211_proto.h
@@ -93,6 +93,7 @@
struct ieee80211_key *, struct mbuf *);
struct mbuf *ieee80211_encap(struct ieee80211vap *, struct ieee80211_node *,
struct mbuf *);
+void ieee80211_free_mbuf(struct mbuf *);
int ieee80211_send_mgmt(struct ieee80211_node *, int, int);
struct ieee80211_appie;
int ieee80211_send_probereq(struct ieee80211_node *ni,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 5:58 PM (10 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33142812
Default Alt Text
D3769.id9019.diff (1 KB)
Attached To
Mode
D3769: net80211: separate mbuf cleanup from ieee80211_fragment()
Attached
Detach File
Event Timeline
Log In to Comment