summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fastfwd.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2013-08-19 13:27:32 +0000
committerandre <andre@FreeBSD.org>2013-08-19 13:27:32 +0000
commit7cc6cc696c12dcee5a294f67527cebb28374c49e (patch)
tree4bf04ae1ab9f3c2b9ed6d2ce7bcd15edb4b3a1f0 /sys/netinet/ip_fastfwd.c
parenta84c641767af511112a0ead58df9bf7937868cde (diff)
downloadFreeBSD-src-7cc6cc696c12dcee5a294f67527cebb28374c49e.zip
FreeBSD-src-7cc6cc696c12dcee5a294f67527cebb28374c49e.tar.gz
Add m_clrprotoflags() to clear protocol specific mbuf flags at up and
downwards layer crossings. Consistently use it within IP, IPv6 and ethernet protocols. Discussed with: trociny, glebius
Diffstat (limited to 'sys/netinet/ip_fastfwd.c')
-rw-r--r--sys/netinet/ip_fastfwd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c
index 3a228ca..989318e 100644
--- a/sys/netinet/ip_fastfwd.c
+++ b/sys/netinet/ip_fastfwd.c
@@ -525,6 +525,10 @@ passout:
if (ip_len <= mtu ||
(ifp->if_hwassist & CSUM_FRAGMENT && (ip_off & IP_DF) == 0)) {
/*
+ * Avoid confusing lower layers.
+ */
+ m_clrprotoflags(m);
+ /*
* Send off the packet via outgoing interface
*/
error = (*ifp->if_output)(ifp, m,
@@ -553,6 +557,10 @@ passout:
do {
m0 = m->m_nextpkt;
m->m_nextpkt = NULL;
+ /*
+ * Avoid confusing lower layers.
+ */
+ m_clrprotoflags(m);
error = (*ifp->if_output)(ifp, m,
(struct sockaddr *)dst, &ro);
OpenPOWER on IntegriCloud