summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2002-10-16 01:54:46 +0000
committersam <sam@FreeBSD.org>2002-10-16 01:54:46 +0000
commit2a86be217a6aed33eda6628df2b175e49172cd9f (patch)
treeb26e1e9f49b40642051748bcd3961cc2a2b5ff1d /sys/net
parent733bfbdd78ddb9efc129532b2c2239d0bacfaf1a (diff)
downloadFreeBSD-src-2a86be217a6aed33eda6628df2b175e49172cd9f.zip
FreeBSD-src-2a86be217a6aed33eda6628df2b175e49172cd9f.tar.gz
Replace aux mbufs with packet tags:
o instead of a list of mbufs use a list of m_tag structures a la openbsd o for netgraph et. al. extend the stock openbsd m_tag to include a 32-bit ABI/module number cookie o for openbsd compatibility define a well-known cookie MTAG_ABI_COMPAT and use this in defining openbsd-compatible m_tag_find and m_tag_get routines o rewrite KAME use of aux mbufs in terms of packet tags o eliminate the most heavily used aux mbufs by adding an additional struct inpcb parameter to ip_output and ip6_output to allow the IPsec code to locate the security policy to apply to outbound packets o bump __FreeBSD_version so code can be conditionalized o fixup ipfilter's call to ip_output based on __FreeBSD_version Reviewed by: julian, luigi (silent), -arch, -net, darren Approved by: julian, silence from everyone else Obtained from: openbsd (mostly) MFC after: 1 month
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bridge.c2
-rw-r--r--sys/net/if_gre.c2
-rw-r--r--sys/net/if_loop.c3
-rw-r--r--sys/net/if_stf.c2
4 files changed, 4 insertions, 5 deletions
diff --git a/sys/net/bridge.c b/sys/net/bridge.c
index e41d8c7..1a59cee 100644
--- a/sys/net/bridge.c
+++ b/sys/net/bridge.c
@@ -816,7 +816,7 @@ bdg_forward(struct mbuf *m0, struct ether_header *const eh, struct ifnet *dst)
args.rule = NULL; /* did we match a firewall rule ? */
/* Fetch state from dummynet tag, ignore others */
for (;m0->m_type == MT_TAG; m0 = m0->m_next)
- if (m0->m_tag_id == PACKET_TAG_DUMMYNET) {
+ if (m0->_m_tag_id == PACKET_TAG_DUMMYNET) {
args.rule = ((struct dn_pkt *)m0)->rule;
shared = 0; /* For sure this is our own mbuf. */
}
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index dfa9ddb..a8231c0 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -384,7 +384,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
/* send it off */
- error = ip_output(m, NULL, &sc->route, 0, NULL);
+ error = ip_output(m, NULL, &sc->route, 0, NULL, NULL);
end:
sc->called = 0;
if (error)
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 1184e9c..57571a8 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -224,8 +224,7 @@ looutput(ifp, m, dst, rt)
m_copydata(m, 0, m->m_pkthdr.len, mtod(n, caddr_t));
n->m_pkthdr = m->m_pkthdr;
n->m_len = m->m_pkthdr.len;
- n->m_pkthdr.aux = m->m_pkthdr.aux;
- m->m_pkthdr.aux = (struct mbuf *)NULL;
+ SLIST_INIT(&m->m_pkthdr.tags);
m_freem(m);
m = n;
}
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index dcbd14c..1acc0a6 100644
--- a/sys/net/if_stf.c
+++ b/sys/net/if_stf.c
@@ -471,7 +471,7 @@ stf_output(ifp, m, dst, rt)
}
ifp->if_opackets++;
- return ip_output(m, NULL, &sc->sc_ro, 0, NULL);
+ return ip_output(m, NULL, &sc->sc_ro, 0, NULL, NULL);
}
static int
OpenPOWER on IntegriCloud