mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
CNetworkInfo::getNetworkInterface display IP address is limited to IPv4
Displayed IP address is now IPv4 only due to referring IPv4 routing table to get default route. This feature is used by hotspots which have small LCD or OLED display to show IP address to remote login. No effects to connect other reflectors. If completely disabled IPv4 world will come, the code need to be revised.
This commit is contained in:
@@ -172,12 +172,13 @@ void CNetworkInfo::getNetworkInterface(unsigned char* info)
|
||||
if (family == AF_INET) {
|
||||
::sprintf(interfacelist[ifnr], "%s:%s", ifa->ifa_name, host);
|
||||
LogInfo(" IPv4: %s", interfacelist[ifnr]);
|
||||
ifnr++;
|
||||
} else {
|
||||
::sprintf(interfacelist[ifnr], "%s:%s", ifa->ifa_name, host);
|
||||
LogInfo(" IPv6: %s", interfacelist[ifnr]);
|
||||
// due to default routing is for IPv4, other
|
||||
// protocols are not candidate to display.
|
||||
}
|
||||
|
||||
ifnr++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user