git://git.onelab.eu
/
ipfw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Major changes:
[ipfw.git]
/
dummynet
/
ip_dummynet.c
diff --git
a/dummynet/ip_dummynet.c
b/dummynet/ip_dummynet.c
index
bdf0a8e
..
c0399bb
100644
(file)
--- a/
dummynet/ip_dummynet.c
+++ b/
dummynet/ip_dummynet.c
@@
-86,6
+86,7
@@
__FBSDID("$FreeBSD: src/sys/netinet/ip_dummynet.c,v 1.110.2.4 2008/10/31 12:58:1
#include <netinet6/ip6_var.h>
#include "missing.h"
#include <netinet6/ip6_var.h>
#include "missing.h"
+
/*
* We keep a private variable for the simulation time, but we could
* probably use an existing one ("softticks" in sys/kern/kern_timeout.c)
/*
* We keep a private variable for the simulation time, but we could
* probably use an existing one ("softticks" in sys/kern/kern_timeout.c)
@@
-959,6
+960,7
@@
dummynet_send(struct mbuf *m)
pkt = dn_tag_get(m);
dst = pkt->dn_dir;
}
pkt = dn_tag_get(m);
dst = pkt->dn_dir;
}
+
switch (dst) {
case DN_TO_IP_OUT:
ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL);
switch (dst) {
case DN_TO_IP_OUT:
ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL);
@@
-1012,7
+1014,6
@@
dummynet_send(struct mbuf *m)
#else
m_freem(m);
#endif
#else
m_freem(m);
#endif
- printf("need to drop the skbuf\n");
break;
default:
break;
default:
@@
-1548,9
+1549,15
@@
dropit:
* Below, the rt_unref is only needed when (pkt->dn_dir == DN_TO_IP_OUT)
* Doing this would probably save us the initial bzero of dn_pkt
*/
* Below, the rt_unref is only needed when (pkt->dn_dir == DN_TO_IP_OUT)
* Doing this would probably save us the initial bzero of dn_pkt
*/
+#if defined( __linux__ )
+#define DN_FREE_PKT(_m) do { \
+ netisr_dispatch(-1, _m); \
+} while (0)
+#else
#define DN_FREE_PKT(_m) do { \
m_freem(_m); \
} while (0)
#define DN_FREE_PKT(_m) do { \
m_freem(_m); \
} while (0)
+#endif
/*
* Dispose all packets and flow_queues on a flow_set.
/*
* Dispose all packets and flow_queues on a flow_set.