smoltcp icon indicating copy to clipboard operation
smoltcp copied to clipboard

Bogus ARP requests when no IP configured

Open Dirbaio opened this issue 4 years ago • 1 comments

When DHCP isn't up, the interface has an address of 0.0.0.0/0 which is actually a CIDR that matches all IPs out there. If you try to connect to a WAN IP in that state it actually sends ARP requests trying to resolve it. It seems we're missing a check that treats 0.0.0.0/0 specially? Alternatively Interface could have a [Option<Cidr>] so we can represent "don't have an IP" as an actual None.

screenshot-2021-04-01_19-02-15

Dirbaio avatar Apr 01 '21 17:04 Dirbaio

0.0.0.0/32 might be less likely to be caught up like that. Or None as you say. In any case it seems that if the address is unspecified (be that 0.0.0.0 or None), most egress should be explicitly prevented.

jordens avatar Apr 08 '21 07:04 jordens

Fixed in #719.

Users are no longer supposed to set 0.0.0.0/0 as an IP address, instead they should set no IP addr at all. #719 makes it possible in nostd.

Dirbaio avatar Jan 15 '23 23:01 Dirbaio