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
Added spec file comments.
[ipfw.git]
/
dummynet
/
ip_dummynet.c
diff --git
a/dummynet/ip_dummynet.c
b/dummynet/ip_dummynet.c
index
b8cbc2e
..
836d1e1
100644
(file)
--- a/
dummynet/ip_dummynet.c
+++ b/
dummynet/ip_dummynet.c
@@
-1540,7
+1540,7
@@
dropit:
pkt = dn_tag_get(m);
pkt->dn_dir = DN_TO_DROP;
}
pkt = dn_tag_get(m);
pkt->dn_dir = DN_TO_DROP;
}
- dummynet_send(m); /* drop the packet */
+ dummynet_send(m); /* drop the packet */
*m0 = NULL;
return ((fs && (fs->flags_fs & DN_NOERROR)) ? 0 : ENOBUFS);
}
*m0 = NULL;
return ((fs && (fs->flags_fs & DN_NOERROR)) ? 0 : ENOBUFS);
}
@@
-1549,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
*/
-#define DN_FREE_PKT(_m) do { \
+#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)
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.
@@
-2272,7
+2278,7
@@
ip_dn_ctl(struct sockopt *sopt)
switch (sopt->sopt_name) {
default :
printf("dummynet: -- unknown option %d", sopt->sopt_name);
switch (sopt->sopt_name) {
default :
printf("dummynet: -- unknown option %d", sopt->sopt_name);
-
error = EINVAL ;
+ error = EINVAL ;
break ;
case IP_DUMMYNET_GET :
break ;
case IP_DUMMYNET_GET :