svn commit: r202094 - user/luigi/ipfw3-head/sys/netinet/ipfw
Luigi Rizzo
luigi at FreeBSD.org
Mon Jan 11 17:35:35 UTC 2010
Author: luigi
Date: Mon Jan 11 17:35:34 2010
New Revision: 202094
URL: http://svn.freebsd.org/changeset/base/202094
Log:
make dummynet consume packets correctly
Modified:
user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dn_io.c
Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dn_io.c
==============================================================================
--- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dn_io.c Mon Jan 11 17:34:32 2010 (r202093)
+++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dn_io.c Mon Jan 11 17:35:34 2010 (r202094)
@@ -799,8 +799,10 @@ dummynet_io(struct mbuf **m0, int dir, s
goto dropit;
}
- if (sch_inst->kflags & DN_ACTIVE)
+ if (sch_inst->kflags & DN_ACTIVE) {
+ m = *m0 = NULL; /* consumed */
goto done; /* already active, nothing to do */
+ }
/* compute the initial allowance */
pipe = &sch->pipe;
@@ -826,14 +828,14 @@ dummynet_io(struct mbuf **m0, int dir, s
printf("dummynet: fast io: pkt chain detected!\n");
m->m_nextpkt = NULL;
}
+ m = NULL;
} else {
*m0 = NULL;
- /* XXX outside lock ? */
- if (m)
- dummynet_send(m);
}
done:
DUMMYNET_UNLOCK();
+ if (m)
+ dummynet_send(m);
return 0;
dropit:
More information about the svn-src-user
mailing list