/[lwip]/lwip/src/core/tcp_in.c
ViewVC logotype

Diff of /lwip/src/core/tcp_in.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by likewise, Thu May 1 13:24:01 2003 UTC revision 1.26 by likewise, Sun May 18 22:29:10 2003 UTC
# Line 112  tcp_input(struct pbuf *p, struct netif * Line 112  tcp_input(struct pbuf *p, struct netif *
112    
113    iphdr = p->payload;    iphdr = p->payload;
114    tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4);    tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4);
115    
116    if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4)))) {    /* remove header from payload */
117      if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))) || (p->tot_len < sizeof(struct tcp_hdr))) {
118      /* drop short packets */      /* drop short packets */
119      DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packet (%u bytes) discarded\n", p->tot_len));      DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packet (%u bytes) discarded\n", p->tot_len));
120  #ifdef TCP_STATS  #ifdef TCP_STATS

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26