Print this page
%B

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/ip_output.c
          +++ new/usr/src/uts/common/inet/ip/ip_output.c
↓ open down ↓ 1640 lines elided ↑ open up ↑
1641 1641                  /*
1642 1642                   * Zero out the checksum field to ensure proper
1643 1643                   * checksum calculation.
1644 1644                   */
1645 1645                  sctph->sh_chksum = 0;
1646 1646  #ifdef  DEBUG
1647 1647                  if (!skip_sctp_cksum)
1648 1648  #endif
1649 1649                          sctph->sh_chksum = sctp_cksum(mp, ip_hdr_length);
1650 1650                  goto ip_hdr_cksum;
     1651 +        } else if (protocol == IPPROTO_DCCP) {
     1652 +                cksump = IPH_DCCPH_CHECKSUMP(ipha, ip_hdr_length);
     1653 +                cksum = IP_DCCP_CSUM_COMP;
1651 1654          } else {
1652 1655                  goto ip_hdr_cksum;
1653 1656          }
1654 1657  
1655 1658          /* ULP puts the checksum field is in the first mblk */
1656 1659          ASSERT(((uchar_t *)cksump) + sizeof (uint16_t) <= mp->b_wptr);
1657 1660  
1658 1661          /*
1659 1662           * We accumulate the pseudo header checksum in cksum.
1660 1663           * This is pretty hairy code, so watch close.  One
↓ open down ↓ 69 lines elided ↑ open up ↑
1730 1733                  /*
1731 1734                   * Zero out the checksum field to ensure proper
1732 1735                   * checksum calculation.
1733 1736                   */
1734 1737                  sctph->sh_chksum = 0;
1735 1738  #ifdef  DEBUG
1736 1739                  if (!skip_sctp_cksum)
1737 1740  #endif
1738 1741                          sctph->sh_chksum = sctp_cksum(mp, ip_hdr_length);
1739 1742                  goto ip_hdr_cksum;
     1743 +        } else if (protocol == IPPROTO_DCCP) {
     1744 +                cksump = IPH_DCCPH_CHECKSUMP(ipha, ip_hdr_length);
     1745 +                cksum = IP_DCCP_CSUM_COMP;
1740 1746          } else {
1741 1747          ip_hdr_cksum:
1742 1748                  /* Calculate IPv4 header checksum */
1743 1749                  ipha->ipha_hdr_checksum = 0;
1744 1750                  ipha->ipha_hdr_checksum = ip_csum_hdr(ipha);
1745 1751                  return (B_TRUE);
1746 1752          }
1747 1753  
1748 1754          /* ULP puts the checksum field is in the first mblk */
1749 1755          ASSERT(((uchar_t *)cksump) + sizeof (uint16_t) <= mp->b_wptr);
↓ open down ↓ 815 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX