mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00: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:
parent
303bc7411f
commit
32ffc69bdd
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue