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)) || |