Fix hardware checksum verification on fragments.

MFC after:		7 days
Reported/tested by: 	Hugo Koji Kobayashi, Vadym Chepkov
Reviewed/help by:	yongari
Approved by:		re (kensmith)
This commit is contained in:
Max Laier 2007-07-03 11:50:02 +00:00
parent 1a1f3aa129
commit d786f620df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171163

View File

@ -566,8 +566,17 @@ pf_reassemble(struct mbuf **m0, struct pf_fragment **frag,
m2 = frent->fr_m;
pool_put(&pf_frent_pl, frent);
pf_nfrents--;
#ifdef __FreeBSD__
m->m_pkthdr.csum_flags &= m2->m_pkthdr.csum_flags;
m->m_pkthdr.csum_data += m2->m_pkthdr.csum_data;
#endif
m_cat(m, m2);
}
#ifdef __FreeBSD__
while (m->m_pkthdr.csum_data & 0xffff0000)
m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0xffff) +
(m->m_pkthdr.csum_data >> 16);
#endif
ip->ip_src = (*frag)->fr_src;
ip->ip_dst = (*frag)->fr_dst;