summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2023-08-21 20:36:01 +0000
committerFelix Fietkau2023-08-21 20:36:06 +0000
commit12ac684ee22aff0ab806c5f6e8031f844cd918f8 (patch)
tree9baacb5d7e412e09f210497725d3c658bde7843d
parent48049524d4fc255d78f054549c75863ca87770d6 (diff)
downloadunetd-12ac684ee22aff0ab806c5f6e8031f844cd918f8.tar.gz
pex: do not query for hosts with a gateway
If we're not the gateway, we don't care about the result If we are the gateway, nobody else will have the answer Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--pex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pex.c b/pex.c
index 8d99d50..854837c 100644
--- a/pex.c
+++ b/pex.c
@@ -344,7 +344,7 @@ network_pex_query_hosts(struct network *net)
void *id;
if ((net->stun.port_ext && host == net->net_config.local_host) ||
- peer->state.connected || peer->endpoint)
+ peer->state.connected || peer->endpoint || host->gateway)
continue;
id = pex_msg_append(PEX_ID_LEN);