diff options
author | andre <andre@FreeBSD.org> | 2013-08-19 13:27:32 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2013-08-19 13:27:32 +0000 |
commit | 7cc6cc696c12dcee5a294f67527cebb28374c49e (patch) | |
tree | 4bf04ae1ab9f3c2b9ed6d2ce7bcd15edb4b3a1f0 /sys/netpfil | |
parent | a84c641767af511112a0ead58df9bf7937868cde (diff) | |
download | FreeBSD-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.c | 4 |
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); |