mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 7 additions and 0 deletions
|
|
@ -988,6 +988,13 @@ found:
|
|||
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 a new issue