Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110651194
D23721.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
D23721.diff
View Options
Index: sys/netgraph/ng_one2many.c
===================================================================
--- sys/netgraph/ng_one2many.c
+++ sys/netgraph/ng_one2many.c
@@ -418,7 +418,7 @@
int error = 0;
int linkNum;
int i;
- struct mbuf *m;
+ struct mbuf *m, *mcpy;
m = NGI_M(item); /* just peaking, mbuf still owned by item */
/* Get link number */
@@ -454,12 +454,13 @@
/* make copies of data and send for all links
* except the first one, which we'll do last
*/
+ mcpy = m_dup(m, M_NOWAIT);
for (i = 1; i < priv->numActiveMany; i++) {
struct mbuf *m2;
struct ng_one2many_link *mdst;
mdst = &priv->many[priv->activeMany[i]];
- m2 = m_dup(m, M_NOWAIT); /* XXX m_copypacket() */
+ m2 = m_copypacket(mcpy, M_NOWAIT);
if (m2 == NULL) {
mdst->stats.memoryFailures++;
NG_FREE_ITEM(item);
@@ -471,6 +472,7 @@
mdst->stats.xmitOctets += m->m_pkthdr.len;
NG_SEND_DATA_ONLY(error, mdst->hook, m2);
}
+ NG_FREE_M(mcpy);
break;
case NG_ONE2MANY_XMIT_FAILOVER:
dst = &priv->many[priv->activeMany[0]];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 22, 11:26 AM (2 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16770483
Default Alt Text
D23721.diff (1 KB)
Attached To
Mode
D23721: ng_one2many: Don't duplicate packets with m_dup() when receiving and re-transmitting
Attached
Detach File
Event Timeline
Log In to Comment