net: tftp: Avoid sending extra ack on completion
PATCH v2 1/1 net: tftp: Avoid sending extra ack on completion
in tftpboot, if ack was already sent previously for this packet, don't send again.
---
v2: Fix it so it actually works :)
net/tftp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
net/tftp.c +6 -5
@@ -668,6 +668,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.
@@ -676,11 +682,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 :
Signature · 1 line
2.17.1
PATCH v2 1/1 net: tftp: Avoid sending extra ack on completion
Quoted 44 lines · Ramon Fried
in tftpboot, if ack was already sent previously for this packet, don't send again.
Fixes cc6b87ecaa96 ("net: tftp: Add client support for RFC 7440")Reported-by Suneel Garapati <[email protected]>Signed-off-by Ramon Fried <[email protected]>---
v2: Fix it so it actually works :)net/tftp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)net/tftp.c +6
-6@@ -668,6 +668,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. @@ -676,11 +682,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 : --
Quoted 2 lines
2.17.1
PATCH v2 1/1 net: tftp: Avoid sending extra ack on completion
In reply to Ramon FriedQuoted 7 lines · Ramon Fried
in tftpboot, if ack was already sent previously for this packet, don't send again.
Fixes cc6b87ecaa96 ("net: tftp: Add client support for RFC 7440")Reported-by Suneel Garapati <[email protected]>Signed-off-by Ramon Fried <[email protected]>
PATCH v2 1/1 net: tftp: Avoid sending extra ack on completion
Quoted 11 lines · Oliver Graute
Quoted 7 lines · Ramon Fried
in tftpboot, if ack was already sent previously for this packet, don't send again.
Fixes cc6b87ecaa96 ("net: tftp: Add client support for RFC 7440")Reported-by Suneel Garapati <[email protected]>Signed-off-by Ramon Fried <[email protected]>Tested-by Oliver Graute <[email protected]>
Tom, can you please merge this ?
This is an important bug fix that should be merged asap.
Thanks,
Ramon.
PATCH v2 1/1 net: tftp: Avoid sending extra ack on completion
In reply to Ramon FriedQuoted 9 lines · Ramon Fried
in tftpboot, if ack was already sent previously for this packet, don't send again.
Fixes cc6b87ecaa96 ("net: tftp: Add client support for RFC 7440")Reported-by Suneel Garapati <[email protected]>Signed-off-by Ramon Fried <[email protected]>Tested-by Suneel Garapati <[email protected]>Tested-by Oliver Graute <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210218/15744abf/attachment.sig>