eblot / pybootd

A minimalist bootp/dhcp/pxe and tftp server
Other
106 stars 31 forks source link

Expecting ACK for block -32768, received 32768 #21

Open Sector7CSD opened 3 years ago

Sector7CSD commented 3 years ago

Another issue, which I stumbled over, has to do with the verification of the received blocks. RHEL's 8.4 initrd.img file is larger than the original TFTP limit of 32 MB.

[cklein@ugd-whvvtr-inst-1:/opt/pxeboot/images]$ l
.r--r--r-- cklein cklein  72 MB Mon May  3 20:30:40 2021  initrd.img
.r--r--r-- cklein cklein 441 B  Mon May  3 21:21:48 2021  TRANS.TBL
.r-xr-xr-x cklein cklein 9.6 MB Thu Apr 29 15:03:45 2021  vmlinuz

During boot I see the following output in the terminal when the initrd.img is transfered to the client:

16:15:59 PXE[tftpd] WARNING: Expecting ACK for block -32768, received 32768

What I did to get it working, I know that is a dirty hack, is the following. In the file tftpd.py in the function recv_ack I disabled the error checking:

    def recv_ack(self, pkt):
        self.log.debug('recv_ack')
        #if pkt['block'] == self.blocknum:
            # We received the correct ACK
        self.handle_ack(pkt)
        #else:
        #    self.log.warn('Expecting ACK for block %d, received %d' %
        #                  (pkt['block'], self.blocknum))

Hopefully there is a better solution to this.