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 |