mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
drop unexpected udp data packet length
This commit is contained in:
parent
6eb7af74a0
commit
4f0e47f809
@ -517,11 +517,10 @@ int RP2040ArduinoPlatform::readBytesMultiCast(uint8_t* buffer, uint16_t maxLen)
|
||||
|
||||
if (len > maxLen)
|
||||
{
|
||||
print("udp buffer to small. was ");
|
||||
print(maxLen);
|
||||
print(", needed ");
|
||||
println(len);
|
||||
fatalError();
|
||||
println("Unexpected UDP data packet length - drop packet");
|
||||
for (size_t i = 0; i < len; i++)
|
||||
_udp.read();
|
||||
return 0;
|
||||
}
|
||||
|
||||
_udp.read(buffer, len);
|
||||
|
Loading…
Reference in New Issue
Block a user