Red Hat Bugzilla – Bug 1025027
GRUB failure in sending the ack packet if has exactly 50 blocks
Last modified: 2015-05-29 12:50:39 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.
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'
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.