提交 b437fc59 编写于 作者: B bernard.xiong

discard packet when tcp_input error occurs.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@485 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 6740422c
......@@ -64,7 +64,11 @@ err_t eth_input(struct pbuf *p, struct netif *inp)
case ETHTYPE_IP:
etharp_ip_input(inp, p);
pbuf_header(p, -((rt_int16_t)sizeof(struct eth_hdr)));
tcpip_input(p, inp);
if (tcpip_input(p, inp) != ERR_OK)
{
/* discard packet */
pbuf_free(p);
}
break;
case ETHTYPE_ARP:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册