summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>1999-05-04 16:24:00 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>1999-05-04 16:24:00 +0000
commit41bfb6539404f7d94977ed16b629cd9e880d52da (patch)
treef1babb532f6362ae4ca918a79de2961f5feb2aa1
parent9a40e3d99de0556128f25774384f6e6e5d7ceb5d (diff)
Notes
-rw-r--r--sys/net/bridge.c4
-rw-r--r--sys/netinet/in.h5
-rw-r--r--sys/netinet/ip_dummynet.c9
-rw-r--r--sys/netinet/ip_input.c4
-rw-r--r--sys/netinet/ip_output.c4
5 files changed, 11 insertions, 15 deletions
diff --git a/sys/net/bridge.c b/sys/net/bridge.c
index 232ffedabaef..c2b6a23f0753 100644
--- a/sys/net/bridge.c
+++ b/sys/net/bridge.c
@@ -500,9 +500,7 @@ bdg_forward (struct mbuf **m0, struct ifnet *dst)
* processing was already done, and we need to go down.
*/
rule = (struct ip_fw_chain *)(m->m_data) ;
- (*m0) = m->m_next ;
- FREE(m, M_IPFW);
- m = *m0 ;
+ (*m0) = m = m->m_next ;
src = m->m_pkthdr.rcvif; /* could be NULL in output */
eh = mtod(m, struct ether_header *); /* XXX */
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 1188bdea11d6..b1feb4f35793 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.h 8.3 (Berkeley) 1/3/94
- * $Id: in.h,v 1.37 1998/08/23 03:07:14 wollman Exp $
+ * $Id: in.h,v 1.38 1998/12/14 18:09:13 luigi Exp $
*/
#ifndef _NETINET_IN_H_
@@ -140,7 +140,8 @@
#define IPPROTO_ENCAP 98 /* encapsulation header */
#define IPPROTO_APES 99 /* any private encr. scheme */
#define IPPROTO_GMTP 100 /* GMTP*/
-/* 101-254: Unassigned */
+/* 101-254: Partly Unassigned */
+#define IPPROTO_PGM 113 /* PGM */
/* 255: Reserved */
/* BSD Private, local use, namespace incursion */
#define IPPROTO_DIVERT 254 /* divert pseudo-protocol */
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index 433b2a43acdd..d287b38e1a66 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.7.2.3 1999/03/26 16:48:55 luigi Exp $
+ * $Id: ip_dummynet.c,v 1.7.2.4 1999/05/04 07:47:44 luigi Exp $
*/
/*
@@ -210,8 +210,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: {
@@ -238,9 +239,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);
}
}
/*
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 1376857542d2..ffa7b0d6a8f7 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $Id: ip_input.c,v 1.111 1999/01/12 12:25:00 eivind Exp $
+ * $Id: ip_input.c,v 1.111.2.1 1999/03/12 01:17:14 julian Exp $
* $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
*/
@@ -275,10 +275,8 @@ ip_input(struct mbuf *m)
* rule.
*/
if (m->m_type == MT_DUMMYNET) {
- struct mbuf *m0 = m ;
rule = (struct ip_fw_chain *)(m->m_data) ;
m = m->m_next ;
- free(m0, M_IPFW);
ip = mtod(m, struct ip *);
hlen = IP_VHL_HL(ip->ip_vhl) << 2;
goto iphack ;
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 24ff45e839e7..46c6ee1072f2 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $Id: ip_output.c,v 1.85.2.1 1999/02/19 18:56:58 luigi Exp $
+ * $Id: ip_output.c,v 1.85.2.2 1999/03/16 18:03:28 luigi Exp $
*/
#define _IP_VHL
@@ -150,7 +150,6 @@ ip_output(m0, opt, ro, flags, imo)
* rule.
*/
if (m->m_type == MT_DUMMYNET) {
- struct mbuf *tmp_m = m ;
/*
* the packet was already tagged, so part of the
* processing was already done, and we need to go down.
@@ -159,7 +158,6 @@ ip_output(m0, opt, ro, flags, imo)
*/
rule = (struct ip_fw_chain *)(m->m_data) ;
m0 = m = m->m_next ;
- free(tmp_m, M_IPFW);
ip = mtod(m, struct ip *);
dst = (struct sockaddr_in *)flags;
ifp = (struct ifnet *)opt;