From 12ac684ee22aff0ab806c5f6e8031f844cd918f8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 21 Aug 2023 22:36:01 +0200 Subject: [PATCH] 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 --- pex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2