meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.62k stars 906 forks source link

[Feature Request]: Add ".local" addresses to isPrivateIpAddress() #5306

Open pdxlocations opened 1 week ago

pdxlocations commented 1 week ago

Platform

Cross-Platform

Description

isPrivateIpAddress checks for local IP address octets but does not include a check for .local addresses.

fifieldt commented 1 week ago

https://datatracker.ietf.org/doc/html/rfc6762

fifieldt commented 6 days ago

Just checking, @pdxlocations - do you use this domain for mqtt or know of people that do, or is this more of a request to make the function "complete" ?

pdxlocations commented 6 days ago

I had been using, for example: raspberrypi.local to connect to my broker. I've since changed to using the IP address to take advantage of the iPrivateIpAddress function.

The feature request is not dire but as you said to make the function "complete". If we want to honor "All" local addresses adding .local may save a user some frustration. Alternatively, or in addition to, I'd be happy to write something up for the docs listing the allowable formats.