Skip to content

Commit

Permalink
Exclude link local ips from local server
Browse files Browse the repository at this point in the history
  • Loading branch information
sgourdas committed Oct 14, 2024
1 parent db673bb commit 59de95c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/localkiwixserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LocalKiwixServer::LocalKiwixServer(QWidget *parent) :
interfaces.reserve(interfacesMap.size() + 1);
for (const auto &interfacePair : interfacesMap) {
QString ipv4 = QString::fromStdString(interfacePair.second.addr);
if (!ipv4.isEmpty()) interfaces.push_back(ipv4);
if (!ipv4.isEmpty() && !ipv4.startsWith("169.254")) interfaces.push_back(ipv4);
QString ipv6 = QString::fromStdString(interfacePair.second.addr6);
if (!ipv6.isEmpty()) interfaces.push_back(ipv6);
}
Expand Down

0 comments on commit 59de95c

Please sign in to comment.