mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
net/tcp: fix invaild application preload
Change-Id: Ifebe4c2715ccfc0e11d8b45792d51912f110d92e Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -319,8 +319,10 @@ uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer,
|
|||||||
/* Provide notification(s) that additional TCP read-ahead data is
|
/* Provide notification(s) that additional TCP read-ahead data is
|
||||||
* available.
|
* available.
|
||||||
*/
|
*/
|
||||||
|
if (queue == &conn->readahead)
|
||||||
tcp_readahead_signal(conn);
|
{
|
||||||
|
tcp_readahead_signal(conn);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ninfo("Buffered %d bytes\n", buflen);
|
ninfo("Buffered %d bytes\n", buflen);
|
||||||
|
|||||||
@@ -1150,6 +1150,15 @@ static void tcp_process_cache(FAR struct net_driver_s *dev, uint8_t domain,
|
|||||||
|
|
||||||
dev->d_len = iob->io_pktlen - NET_LL_HDRLEN(dev);
|
dev->d_len = iob->io_pktlen - NET_LL_HDRLEN(dev);
|
||||||
|
|
||||||
|
if (IFF_IS_IPv4(dev->d_flags))
|
||||||
|
{
|
||||||
|
tcp_ipv4_select(dev);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tcp_ipv6_select(dev);
|
||||||
|
}
|
||||||
|
|
||||||
tcp_input(dev, domain, iplen, NULL);
|
tcp_input(dev, domain, iplen, NULL);
|
||||||
|
|
||||||
iob_free_queue(iob, &conn->pendingahead,
|
iob_free_queue(iob, &conn->pendingahead,
|
||||||
|
|||||||
Reference in New Issue
Block a user