Check for BGE_RXBDFLAG_IP_CSUM flag before marking mbuf as with valid

checksum. This fixes operation of PPPoE and other non-IP Ethernet
protocols.
This commit is contained in:
Gleb Smirnoff 2006-01-21 09:54:32 +00:00
parent 1749c2163b
commit 78178cd132

View File

@ -2629,10 +2629,11 @@ bge_rxeof(sc)
m->m_pkthdr.rcvif = ifp;
if (ifp->if_capenable & IFCAP_RXCSUM) {
m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
if ((cur_rx->bge_ip_csum ^ 0xffff) == 0)
m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
if (cur_rx->bge_flags & BGE_RXBDFLAG_IP_CSUM) {
m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
if ((cur_rx->bge_ip_csum ^ 0xffff) == 0)
m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
}
if (cur_rx->bge_flags & BGE_RXBDFLAG_TCP_UDP_CSUM &&
m->m_pkthdr.len >= ETHER_MIN_NOPAD) {
m->m_pkthdr.csum_data =