summaryrefslogtreecommitdiffstats
path: root/sys/netpfil
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/netpfil
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/netpfil')
-rw-r--r--sys/netpfil/pf/pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 8fa1c90..2de8c40 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -5310,7 +5310,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
ip->ip_sum = in_cksum(m0, ip->ip_hl << 2);
m0->m_pkthdr.csum_flags &= ~CSUM_IP;
}
- m0->m_flags &= ~(M_PROTOFLAGS);
+ m_clrprotoflags(m0); /* Avoid confusing lower layers. */
error = (*ifp->if_output)(ifp, m0, sintosa(&dst), NULL);
goto done;
}
@@ -5335,7 +5335,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
m1 = m0->m_nextpkt;
m0->m_nextpkt = NULL;
if (error == 0) {
- m0->m_flags &= ~(M_PROTOFLAGS);
+ m_clrprotoflags(m0);
error = (*ifp->if_output)(ifp, m0, sintosa(&dst), NULL);
} else
m_freem(m0);
OpenPOWER on IntegriCloud