Bug 1025027

Summary: GRUB failure in sending the ack packet if has exactly 50 blocks
Product: [Fedora] Fedora Reporter: Paulo Flabiano Smorigo <pfsmorigo>
Component: grub2Assignee: Paulo Flabiano Smorigo <pfsmorigo>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: bcl, dennis, mads, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-29 16:50:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
send tftp ack packet before closing the socket none

Description Paulo Flabiano Smorigo 2013-10-30 19:00:18 UTC
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 09:39:37 UTC
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.