mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
net/icmp: consume the data length to avoid duplicate packet
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -181,7 +181,8 @@ static uint16_t recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
|||||||
|
|
||||||
/* Indicate that the data has been consumed */
|
/* Indicate that the data has been consumed */
|
||||||
|
|
||||||
flags &= ~ICMP_NEWDATA;
|
flags &= ~ICMP_NEWDATA;
|
||||||
|
dev->d_len = 0;
|
||||||
goto end_wait;
|
goto end_wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,8 @@ static uint16_t recvfrom_eventhandler(FAR struct net_driver_s *dev,
|
|||||||
|
|
||||||
/* Indicate that the data has been consumed */
|
/* Indicate that the data has been consumed */
|
||||||
|
|
||||||
flags &= ~ICMPv6_NEWDATA;
|
flags &= ~ICMPv6_NEWDATA;
|
||||||
|
dev->d_len = 0;
|
||||||
goto end_wait;
|
goto end_wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user