summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_dummynet.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-01-16 11:13:18 +0000
committerglebius <glebius@FreeBSD.org>2005-01-16 11:13:18 +0000
commit4f5002e05460f9c986d37a299e2fa4440df5a279 (patch)
tree717313b72c1381ac00398d9ecbf0e60d21fadb98 /sys/netinet/ip_dummynet.c
parent1ff141d1b61992bd23162070b4c777f5aabebf03 (diff)
downloadFreeBSD-src-4f5002e05460f9c986d37a299e2fa4440df5a279.zip
FreeBSD-src-4f5002e05460f9c986d37a299e2fa4440df5a279.tar.gz
- Reduce number of arguments passed to dummynet_io(), we already have cookie
in struct ip_fw_args itself. - Remove redundant &= 0xffff from dummynet_io().
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r--sys/netinet/ip_dummynet.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index 93f0696..fea5981 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -1122,7 +1122,7 @@ locate_flowset(int pipe_nr, struct ip_fw *rule)
*
*/
static int
-dummynet_io(struct mbuf *m, int pipe_nr, int dir, struct ip_fw_args *fwa)
+dummynet_io(struct mbuf *m, int dir, struct ip_fw_args *fwa)
{
struct dn_pkt_tag *pkt;
struct m_tag *mtag;
@@ -1146,13 +1146,11 @@ dummynet_io(struct mbuf *m, int pipe_nr, int dir, struct ip_fw_args *fwa)
is_pipe = (fwa->rule->fw_flg & IP_FW_F_COMMAND) == IP_FW_F_PIPE;
#endif
- pipe_nr &= 0xffff ;
-
DUMMYNET_LOCK();
/*
* This is a dummynet rule, so we expect an O_PIPE or O_QUEUE rule.
*/
- fs = locate_flowset(pipe_nr, fwa->rule);
+ fs = locate_flowset(fwa->cookie, fwa->rule);
if (fs == NULL)
goto dropit ; /* this queue/pipe does not exist! */
pipe = fs->pipe ;
OpenPOWER on IntegriCloud