Revert "Prevent block counter rollover"
This reverts commit 49b156879a.
This commit is contained in:
parent
73a1c11f4f
commit
f5d0a4ffe1
1 changed files with 3 additions and 2 deletions
5
tftp.c
5
tftp.c
|
|
@ -400,8 +400,9 @@ int tftp_put(struct nmrpd_args *args)
|
||||||
|
|
||||||
if (timeouts || ackblock == block) {
|
if (timeouts || ackblock == block) {
|
||||||
if (!timeouts) {
|
if (!timeouts) {
|
||||||
if (block < UINT16_MAX) {
|
if (++block == 0) {
|
||||||
++block;
|
// rollover; skip to block 1
|
||||||
|
block = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pkt_mknum(tx, DATA);
|
pkt_mknum(tx, DATA);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue