/[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.23 by davidhaas, Wed Apr 9 20:28:15 2003 UTC revision 1.24 by likewise, Thu May 1 08:03:51 2003 UTC
# Line 113  tcp_input(struct pbuf *p, struct netif * Line 113  tcp_input(struct pbuf *p, struct netif *
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    pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4)));    if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4)))) {
117        /* drop short packets */
118        DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: short packet (%u bytes) discarded\n", p->tot_len));
119    #ifdef TCP_STATS
120        ++lwip_stats.tcp.lenerr;
121        ++lwip_stats.tcp.drop;
122    #endif /* TCP_STATS */
123        pbuf_free(p);
124        return;
125      }
126        
127    /* Don't even process incoming broadcasts/multicasts. */    /* Don't even process incoming broadcasts/multicasts. */
128    if(ip_addr_isbroadcast(&(iphdr->dest), &(inp->netmask)) ||    if(ip_addr_isbroadcast(&(iphdr->dest), &(inp->netmask)) ||

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

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