lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #37969] SYN packet dropped as short packet in tcp_inpu


From: Riccardo Manfrin
Subject: [lwip-devel] [bug #37969] SYN packet dropped as short packet in tcp_input function
Date: Fri, 21 Dec 2012 12:56:04 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1

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

                 Summary: SYN packet dropped as short packet in tcp_input
function
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: riccardomanfrin
            Submitted on: Fri 21 Dec 2012 12:56:02 PM GMT
                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'm integrating lwIP 1.4.0 in a NXP LPC cortex m3. I'm not using an operating
system.

I'm experiencing a drop on TCP SYN packets in tcp_input.c at this point (in
tcp_input function):

  /* Move the payload pointer in the pbuf so that it points to the
     TCP data instead of the TCP header. */
  hdrlen = TCPH_HDRLEN(tcphdr);
  if(pbuf_header(p, -(hdrlen * 4))){
    /* drop short packets */
    LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packetn"));
    TCP_STATS_INC(tcp.lenerr);
    TCP_STATS_INC(tcp.drop);
    snmp_inc_tcpinerrs();
    pbuf_free(p);
    return;
  }

In short the (increment_magnitude <= p->len) check fails as the increment is
by 40 bytes and p->len is 30. Actually, the packet is 40 bytes long but
splitted in to pbufs chunks (30+10). 

I wonder if this is the usual way of processing the SYN but I would expect the
SYN/ACK message to be sent in these cases.

As I drop the packet, the accept callback is not invoked and consequently I
cannot enstablish the TCP connection.

Regards,
Riccardo Manfrin




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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