DragonFly commits List (threaded) for 2007-08
DragonFly BSD
DragonFly commits List (threaded) for 2007-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/dev/netif/nfe if_nfe.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Aug 2007 11:12:09 -0700 (PDT)

:+			/* this doesn't work */
: 			if (flags &
: 			    (NFE_RX_UDP_CSUMOK_V2 | NFE_RX_TCP_CSUMOK_V2)) {
: 				m->m_pkthdr.csum_flags |= CSUM_DATA_VALID |
: 							  CSUM_PSEUDO_HDR;
: 				m->m_pkthdr.csum_data = 0xffff;
: 			}

    I think I found the problem.  Well, two problems.

    First, take a look at ip_input.c line 1292.  If CSUM_DATA_VALID and
    CSUM_PSEUDO_HDR are set in all the fragments, the m->m_pkthdr.csum_data
    calculation in ip_input will case csum_data to be invalid (i.e. it
    will not remain 0xffff) and cause the UDP checksum test, which XORs
    csum_data with 0xffff, to fail.

    The second problem is the fact that the ethernet interface is setting
    UDP/TCP CSUMOK on a packet fragment in the first place.  There is no
    way that NFE could possibly know whether the UDP/TCP checksum is 
    correct on a fragment.

    I dont want our network interfaces to get into the business of 
    interpreting the contents of the packet, though, so I'm not sure
    what the solution is.  Perhaps we should adjust our IP defragmenter
    to just clean out the CSUM_DATA_VALID and CSUM_PSEUDO_HDR flags.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]