Bug 1025027 - GRUB failure in sending the ack packet if has exactly 50 blocks
GRUB failure in sending the ack packet if has exactly 50 blocks
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Paulo Flabiano Smorigo
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-30 15:00 EDT by Paulo Flabiano Smorigo
Modified: 2015-05-29 12:50 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-05-29 12:50:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
send tftp ack packet before closing the socket (767 bytes, patch)
2013-10-30 15:00 EDT, Paulo Flabiano Smorigo
no flags Details | Diff

  None (edit)
Description Paulo Flabiano Smorigo 2013-10-30 15:00:18 EDT
Created attachment 817593 [details]
send tftp ack packet before closing the socket

While grub sends tftp acks, it maintains a 'count' variable that is incremented on each data packet received from tftp server. On every data packet received, if 'count' is less than 50, it sends an ack, otherwise it wont. So for this '50'th packet the ack is sent by another function 'tftp_packets_pulled' that is called later from net read routine through a function pointer.

When the last block of a file is received as a data packet it is verified that it's the last block and the socket is closed.

Now there is a corner case. In case the last block happens to be that '50'th block the ack is not sent (as usual) and the socket is closed. Afterwards, when the net read routine calls 'tftp_packets_pulled' it tries to send the ack using that closed socket, resulting in failure in sending the ack packet! This happened to be the case for the vmlinuz file I'm trying to load.

The attached patch fixes this issue by checking if the ack packet is already sent before closing the packet; if not sent call the ack routine.
Comment 1 Fedora End Of Life 2015-05-29 05:39:37 EDT
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Note You need to log in before you can comment on or make changes to this bug.