lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #36153] TCP Cheksum error if LWIP_CHECKSUM_ON_COPY=1


From: Alexander
Subject: [lwip-devel] [bug #36153] TCP Cheksum error if LWIP_CHECKSUM_ON_COPY=1
Date: Thu, 12 Apr 2012 07:58:17 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0

URL:
  <http://savannah.nongnu.org/bugs/?36153>

                 Summary: TCP Cheksum error if  LWIP_CHECKSUM_ON_COPY=1
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: pronkin
            Submitted on: Чтв 12 Апр 2012 07:58:16
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: 1.4.0

    _______________________________________________________

Details:

I found that if LWIP_CHECKSUM_ON_COPY=1 tcp checksum errors may occur.

It happened for this situation:

options used:

#define TCP_MSS                    1460
#define LWIP_CHECKSUM_ON_COPY      1

const char badPaket[] = { ..full data in attach file (size = 4337) .. };
netconn_write(newconn, badPaket, sizeof(badPaket), NETCONN_NOCOPY);

//this sends 3 packets (1460 + 1460 + 1417)
//in last packet checksum incorrect (if last packet has even length all OK)

if I add sanity check option
#define TCP_CHECKSUM_ON_COPY_SANITY_CHECK  1 

now everything works fine but error message printed
tcp_output_segment: calculated checksum is 65c1 instead of 1017

I attached pcap dump and demo code to reproduce the problem
about may configuration:
32bit ARM Cortex-M3 (STM32) 
gcc 4.6.0
netconn API used



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Чтв 12 Апр 2012 07:58:16  Name: bad_checksum.pcap  Size: 10kB  
By: pronkin

<http://savannah.nongnu.org/bugs/download.php?file_id=25632>
-------------------------------------------------------
Date: Чтв 12 Апр 2012 07:58:16  Name: bad_checksum.c  Size: 26kB   By:
pronkin

<http://savannah.nongnu.org/bugs/download.php?file_id=25633>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?36153>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]