mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 14:12:05 +00:00
add RFC 3927 IP address space to private IP checks (#5115)
Add the RFC 3927 IP address block (169.254.0.0/16), also referred to as IPIPA, to the private address checks for MQTT functionality.
This commit is contained in:
parent
5ff8c904c8
commit
a4705d2c19
@ -746,7 +746,8 @@ bool MQTT::isPrivateIpAddress(const char address[])
|
||||
}
|
||||
|
||||
// Check the easy ones first.
|
||||
if (strcmp(address, "127.0.0.1") == 0 || strncmp(address, "10.", 3) == 0 || strncmp(address, "192.168", 7) == 0) {
|
||||
if (strcmp(address, "127.0.0.1") == 0 || strncmp(address, "10.", 3) == 0 || strncmp(address, "192.168", 7) == 0 ||
|
||||
strncmp(address, "169.254", 7) == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user