mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 06:07:00 +00:00
Ptch by Hideki IWAMOTO, fix a bug preventing tftp from getting or
putting more than 0xffff blocks.
This commit is contained in:
parent
6db8c22d07
commit
c699778fbb
@ -156,7 +156,7 @@ static inline int tftp(const int cmd, const struct hostent *host,
|
|||||||
int opcode = 0;
|
int opcode = 0;
|
||||||
int finished = 0;
|
int finished = 0;
|
||||||
int timeout = bb_tftp_num_retries;
|
int timeout = bb_tftp_num_retries;
|
||||||
int block_nr = 1;
|
unsigned short block_nr = 1;
|
||||||
|
|
||||||
#ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE
|
#ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE
|
||||||
int want_option_ack = 0;
|
int want_option_ack = 0;
|
||||||
@ -462,7 +462,7 @@ static inline int tftp(const int cmd, const struct hostent *host,
|
|||||||
|
|
||||||
if (cmd_put && (opcode == TFTP_ACK)) {
|
if (cmd_put && (opcode == TFTP_ACK)) {
|
||||||
|
|
||||||
if (tmp == (block_nr - 1)) {
|
if (tmp == (unsigned short)(block_nr - 1)) {
|
||||||
if (finished) {
|
if (finished) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user