Skip to content

Commit 12ac684

Browse files
committed
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 <[email protected]>
1 parent 4804952 commit 12ac684

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pex.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ network_pex_query_hosts(struct network *net)
344344
void *id;
345345

346346
if ((net->stun.port_ext && host == net->net_config.local_host) ||
347-
peer->state.connected || peer->endpoint)
347+
peer->state.connected || peer->endpoint || host->gateway)
348348
continue;
349349

350350
id = pex_msg_append(PEX_ID_LEN);

0 commit comments

Comments
 (0)