Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2014 23:15:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 194697] New: incoming IP TOS bits get zeroed on mbufs that need checksumming
Message-ID:  <bug-194697-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194697

            Bug ID: 194697
           Summary: incoming IP TOS bits get zeroed on mbufs that need
                    checksumming
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: seb@f5.com

Created attachment 148780
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=148780&action=edit
save & restore IP TOS field when computing TCP checksum

On mbufs that don't have the CSUM_DATA_VALID flag set, tcp_input() needs to
compute the TCP checksum itself.

The TCP checksum includes some but not all fields from the IP header.

tcp_input() zeroes the fields of the IP header that are not to be included in
the checksum, then checksums the entire packet (IP header, TCP header, and TCP
data), then restores the IP header fields it will need later.

The bug is that the IP TOS field was not restored, so the later read of it
returned a zeroed byte instead of the incoming packet's actual TOS value.

The attached patch contains a suggested fix that resolves the issue for me.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194697-8>