mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
net: tftp: Avoid sending extra ack on completion
in tftpboot, if ack was already sent previously for this
packet, don't send again.
Fixes: cc6b87ecaa
("net: tftp: Add client support for RFC 7440")
Reported-by: Suneel Garapati <suneelglinux@gmail.com>
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
Tested-by: Suneel Garapati <suneelglinux@gmail.com>
Tested-by: Oliver Graute <oliver.graute@kococonnector.com>
This commit is contained in:
parent
56f1bcc4b7
commit
2dddc1bb29
1 changed files with 6 additions and 5 deletions
11
net/tftp.c
11
net/tftp.c
|
@ -669,6 +669,12 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
|
|||
break;
|
||||
}
|
||||
|
||||
if (len < tftp_block_size) {
|
||||
tftp_send();
|
||||
tftp_complete();
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Acknowledge the block just received, which will prompt
|
||||
* the remote for the next one.
|
||||
|
@ -677,11 +683,6 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
|
|||
tftp_send();
|
||||
tftp_next_ack += tftp_windowsize;
|
||||
}
|
||||
|
||||
if (len < tftp_block_size) {
|
||||
tftp_send();
|
||||
tftp_complete();
|
||||
}
|
||||
break;
|
||||
|
||||
case TFTP_ERROR:
|
||||
|
|
Loading…
Add table
Reference in a new issue