106 |
|
|
107 |
iphdr = p->payload; |
iphdr = p->payload; |
108 |
tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); |
tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); |
109 |
|
|
110 |
pbuf_header(p, -(IPH_HL(iphdr) * 4)); |
pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))); |
111 |
|
|
112 |
/* Don't even process incoming broadcasts/multicasts. */ |
/* Don't even process incoming broadcasts/multicasts. */ |
113 |
if(ip_addr_isbroadcast(&(iphdr->dest), &(inp->netmask)) || |
if(ip_addr_isbroadcast(&(iphdr->dest), &(inp->netmask)) || |
116 |
return; |
return; |
117 |
} |
} |
118 |
|
|
|
|
|
119 |
/* Verify TCP checksum. */ |
/* Verify TCP checksum. */ |
120 |
if(inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src), |
if(inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src), |
121 |
(struct ip_addr *)&(iphdr->dest), |
(struct ip_addr *)&(iphdr->dest), |