summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_gamelist.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp
index fc08437f8..ee55976f6 100644
--- a/src/network/network_gamelist.cpp
+++ b/src/network/network_gamelist.cpp
@@ -65,7 +65,14 @@ static void NetworkGameListHandleDelayedInsert()
* @return a point to the newly added or already existing item */
NetworkGameList *NetworkGameListAddItem(NetworkAddress address)
{
- if (StrEmpty(address.GetHostname())) return NULL;
+ const char *hostname = address.GetHostname();
+
+ /* Do not query the 'any' address. */
+ if (StrEmpty(hostname) ||
+ strcmp(hostname, "0.0.0.0") == 0 ||
+ strcmp(hostname, "::") == 0) {
+ return NULL;
+ }
NetworkGameList *item, *prev_item;