summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_dummynet.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>1999-05-04 16:20:33 +0000
committerluigi <luigi@FreeBSD.org>1999-05-04 16:20:33 +0000
commit2085d1a0500e60ec06a7ca2ded31bde3fe581bd6 (patch)
tree295f2aed2025bfbb8b59b5ac9fb1d8855ac01336 /sys/netinet/ip_dummynet.c
parentaa335447efab0773117fd11c822ab38333c62be6 (diff)
downloadFreeBSD-src-2085d1a0500e60ec06a7ca2ded31bde3fe581bd6.zip
FreeBSD-src-2085d1a0500e60ec06a7ca2ded31bde3fe581bd6.tar.gz
Free the dummynet descriptor in ip_dummynet, not in the called
routines. The descriptor contains parameters which could be used within those routines (eg. ip_output() ). On passing, add IPPROTO_PGM entry to netinet/in.h
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r--sys/netinet/ip_dummynet.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index 024998c..49439fd 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -10,7 +10,7 @@
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
- * $Id: ip_dummynet.c,v 1.12 1999/04/20 13:32:04 peter Exp $
+ * $Id: ip_dummynet.c,v 1.13 1999/05/04 07:30:07 luigi Exp $
*/
/*
@@ -211,8 +211,9 @@ dn_move(struct dn_pipe *pipe, int immediate)
* m_next = the actual mbuf to be processed by ip_input/output
* m_data = the matching rule
* The vestigial element is the same memory area used by
- * the dn_pkt, and IS FREED IN ip_input/ip_output. IT IS
- * NOT A REAL MBUF, just a block of memory acquired with malloc().
+ * the dn_pkt, and IS FREED HERE because it can contain
+ * parameters passed to the called routine. The buffer IS NOT
+ * A REAL MBUF, just a block of memory acquired with malloc().
*/
switch (pkt->dn_dir) {
case DN_TO_IP_OUT: {
@@ -239,9 +240,9 @@ dn_move(struct dn_pipe *pipe, int immediate)
default:
printf("dummynet: bad switch %d!\n", pkt->dn_dir);
m_freem(pkt->dn_m);
- FREE(pkt, M_IPFW);
break ;
}
+ FREE(pkt, M_IPFW);
}
}
/*
OpenPOWER on IntegriCloud