smoltcp-rs / smoltcp

a smol tcp/ip stack
BSD Zero Clause License
3.79k stars 427 forks source link

DHCP replies with ICMP Port Unreachable when RawSocket buffer full #457

Closed Dirbaio closed 3 years ago

Dirbaio commented 3 years ago

Right before the ACK, a random UDP broadcast arrives which occupies the only slot in the RawSocket buffer. When the ACK arrives, the RawSocket is full, so it doesn't accept the packet. smoltcp then replies with a "port unreachable". This probably shouldn't happen.

screenshot-2021-04-01_15-42-35

(DHCP doesn't retry the request after that and the device goes offline, but I think that's another bug...)

ryan-summers commented 3 years ago

I was observing this as well, thanks for figuring out the root cause here!

Dirbaio commented 3 years ago

Fixed in #459