From ddebe8979ef3b123f22936763e42cba8a679c6fb Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Sun, 1 Mar 2020 21:55:59 +0100 Subject: [PATCH] Extend blind mode to TFTP --- tftp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tftp.c b/tftp.c index 27ca320..b6f5ce7 100644 --- a/tftp.c +++ b/tftp.c @@ -453,6 +453,12 @@ int tftp_put(struct nmrpd_args *args) } else if (!ret) { if (++timeouts < 5 || (!block && timeouts < 10)) { continue; + } else if (args->blind) { + timeouts = 0; + // fake an ACK packet + pkt_mknum(rx, ACK); + pkt_mknum(rx + 2, block); + continue; } else if (block) { fprintf(stderr, "Timeout while waiting for ACK(%d).\n", block); } else { -- 2.25.1