mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 07:18:49 +08:00
net/icmp: Fix devif_loopback dead loop when unrecognized ICMP packet received
When an unrecognized ICMP (type=3, code=2) packet is received, the ICMP flow does not set dev->d_len to 0, causing a devif_loopback dead loop. Therefore, in ICMP input processing, when an ICMP_DEST_UNREACHABLE message is received, if it is not ICMP_FRAG_NEEDED code, jump to typeerr for error handling. Signed-off-by: daichuan <daichuan@xiaomi.com>
This commit is contained in:
@@ -443,6 +443,10 @@ void icmp_input(FAR struct net_driver_s *dev)
|
||||
|
||||
goto icmp_send_nothing;
|
||||
}
|
||||
else
|
||||
{
|
||||
goto typeerr;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if (icmp->type == ICMP_TIMESTAMP_REQUEST)
|
||||
|
||||
Reference in New Issue
Block a user