1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Per jlemon: add code to nge_rxeof() to allow verification of TCP and

UDP checksums too, not just IP. The chip only tells us if the checksum
is ok, it does not give us a copy of the partial checksum for later
processing. We have to deal with this the right way, but we can deal
with it.
This commit is contained in:
Bill Paul 2001-05-29 22:14:03 +00:00
parent 49ca4f3f52
commit 2195de46d3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77440

View File

@ -1293,6 +1293,14 @@ static void nge_rxeof(sc)
m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
if (!(extsts & NGE_RXEXTSTS_IPCSUMERR))
m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
if ((extsts & NGE_RXEXTSTS_TCPPKT &&
!(extsts & NGE_RXEXTSTS_TCPCSUMERR)) ||
(extsts & NGE_RXEXTSTS_UDPPKT &&
!(extsts & NGE_RXEXTSTS_UDPCSUMERR))) {
m->m_pkthdr.csum_flags |=
CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
m->m_pkthdr.csum_data = 0;
}
}
#if NVLAN > 0