From: Joseph C. Lehner Date: Sun, 1 Mar 2020 20:55:59 +0000 (+0100) Subject: Extend blind mode to TFTP X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ddebe8979ef3b123f22936763e42cba8a679c6fb;p=oweals%2Fnmrpflash.git Extend blind mode to TFTP --- 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 {