summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2025-02-28 15:02:45 +0000
committerFelix Fietkau2025-02-28 15:03:29 +0000
commit28d86bd30e97c7be4d83763b016626c98f0b72d0 (patch)
tree0317c91acd5a479f58db055cc11f75282b848da9
parent3fab99eab4d5fe29280babcfa5d6b86e43b88cad (diff)
downloadunetd-28d86bd30e97c7be4d83763b016626c98f0b72d0.tar.gz
pex: only respond to update requests when we have network data
Avoids interfering with existing network update requests 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 cc374af..8fb9c3c 100644
--- a/pex.c
+++ b/pex.c
@@ -572,7 +572,7 @@ network_pex_recv_update_request(struct network *net, struct network_peer *peer,
D("receive update request, local version=%"PRIu64", remote version=%"PRIu64, net->net_data_version, req_version);
- if (req_version >= net->net_data_version) {
+ if (req_version && req_version >= net->net_data_version) {
struct pex_update_response_no_data *res;
pex_msg_init_ext(net, PEX_MSG_UPDATE_RESPONSE_NO_DATA, !!addr);