mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-09-08 22:58:03 -04:00
Fix broken CI on Linux (aarch64, focal)
This commit is contained in:
parent
8bbda99cab
commit
f6df2342cf
@ -89,7 +89,8 @@ bool ipAvailable(const std::string addr)
|
|||||||
{
|
{
|
||||||
auto interfaces = kiwix::getNetworkInterfacesIPv4Or6();
|
auto interfaces = kiwix::getNetworkInterfacesIPv4Or6();
|
||||||
|
|
||||||
for (const auto& [_, interfaceIps] : interfaces) {
|
for (const auto& kv : interfaces) {
|
||||||
|
const auto& interfaceIps = kv.second;
|
||||||
if ((interfaceIps.addr == addr) || (interfaceIps.addr6 == addr)) {
|
if ((interfaceIps.addr == addr) || (interfaceIps.addr6 == addr)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,8 @@ IpAddress getBestPublicIps() {
|
|||||||
#endif
|
#endif
|
||||||
const char* const v4prefixes[] = { "192.168", "172.16", "10.0", "169.254" };
|
const char* const v4prefixes[] = { "192.168", "172.16", "10.0", "169.254" };
|
||||||
for (const auto& prefix : v4prefixes) {
|
for (const auto& prefix : v4prefixes) {
|
||||||
for (const auto& [_, interfaceIps] : interfaces) {
|
for (const auto& kv : interfaces) {
|
||||||
|
const auto& interfaceIps = kv.second;
|
||||||
if (kiwix::startsWith(interfaceIps.addr, prefix)) {
|
if (kiwix::startsWith(interfaceIps.addr, prefix)) {
|
||||||
updatePublicIpAddress(bestPublicIps, interfaceIps);
|
updatePublicIpAddress(bestPublicIps, interfaceIps);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user