Skip to content

Commit

Permalink
be more tolerant of laggy networks;
Browse files Browse the repository at this point in the history
client has a 5sec timeout before it retries the RRQ when
initiating a download

previously, if client eventually received a response for
both of the issued RRQ's, it would panic and disconnect

instead, ignore the duplicate ack/oack and keep going
  • Loading branch information
9001 committed Jun 14, 2024
1 parent 8e52f3d commit 72acb11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions partftpy/TftpStates.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ def handle(self, pkt, raddress, rport):
self.sendError(TftpErrors.IllegalTftpOp)
raise TftpException("Received ERR from peer: " + str(pkt))

elif isinstance(pkt, TftpPacketACK) or isinstance(pkt, TftpPacketOACK):
log.warning("Discarding unexpected packet type (retransmission?): %s", pkt)
return self

else:
self.sendError(TftpErrors.IllegalTftpOp)
raise TftpException("Received unknown packet type from peer: " + str(pkt))
Expand Down

0 comments on commit 72acb11

Please sign in to comment.