Fix five years old bug in ip_reass(): if we are using 'full' (i.e. including
pseudo header) hardware rx checksum offloading ip_reass() fails to calculate TCP/UDP checksum for reassembled packet correctly. This also should fix recent 'NFS over UDP over bge' issue exposed by if_bge.c rev. 1.123 Reviewed by: sam (earlier version), bde Approved by: glebius (mentor) MFC after: 2 weeks
This commit is contained in:
parent
b64ff0e36e
commit
6edb555dbc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155425
@ -988,6 +988,13 @@ ip_reass(struct mbuf *m)
|
||||
m->m_pkthdr.csum_data += q->m_pkthdr.csum_data;
|
||||
m_cat(m, q);
|
||||
}
|
||||
/*
|
||||
* In order to do checksumming faster we do 'end-around carry' here
|
||||
* (and not in for{} loop), though it implies we are not going to
|
||||
* reassemble more than 64k fragments.
|
||||
*/
|
||||
m->m_pkthdr.csum_data =
|
||||
(m->m_pkthdr.csum_data & 0xffff) + (m->m_pkthdr.csum_data >> 16);
|
||||
#ifdef MAC
|
||||
mac_create_datagram_from_ipq(fp, m);
|
||||
mac_destroy_ipq(fp);
|
||||
|
Loading…
Reference in New Issue
Block a user