Skip to content
  1. Apr 13, 2010
  2. Apr 12, 2010
    • David S. Miller's avatar
      tcp: Set CHECKSUM_UNNECESSARY in tcp_init_nondata_skb · 2e8e18ef
      David S. Miller authored
      Back in commit 04a0551c
      
      
      ("loopback: Drop obsolete ip_summed setting") we stopped
      setting CHECKSUM_UNNECESSARY in the loopback xmit.
      
      This is because such a setting was a lie since it implies that the
      checksum field of the packet is properly filled in.
      
      Instead what happens normally is that CHECKSUM_PARTIAL is set and
      skb->csum is calculated as needed.
      
      But this was only happening for TCP data packets (via the
      skb->ip_summed assignment done in tcp_sendmsg()).  It doesn't
      happen for non-data packets like ACKs etc.
      
      Fix this by setting skb->ip_summed in the common non-data packet
      constructor.  It already is setting skb->csum to zero.
      
      But this reminds us that we still have things like ip_output.c's
      ip_dev_loopback_xmit() which sets skb->ip_summed to the value
      CHECKSUM_UNNECESSARY, which Herbert's patch teaches us is not
      valid.  So we'll have to address that at some point too.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e8e18ef
    • Herbert Xu's avatar
      inet: Remove unused send_check length argument · bb296246
      Herbert Xu authored
      
      
      inet: Remove unused send_check length argument
      
      This patch removes the unused length argument from the send_check
      function in struct inet_connection_sock_af_ops.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Tested-by: default avatarYinghai <yinghai.lu@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb296246