Skip Menu |

This queue is for tickets about the POE-Component-TFTPd CPAN distribution.

Report information
The Basics
Id: 65090
Status: resolved
Priority: 0/
Queue: POE-Component-TFTPd

People
Owner: JHTHORSEN [...] cpan.org
Requestors: brendan.beveridge [...] optusnet.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: infinite client retries
Date: Tue, 25 Jan 2011 15:37:34 +1100
To: bug-POE-Component-TFTPd [...] rt.cpan.org
From: Brendan Beveridge <brendan.beveridge [...] optusnet.com.au>
Hi, I noticed that the module does not allow a client to hit the retry limit if the client stops responding. The reason for this is that the module resets the retry counter if the server sends data to the client rather than when the client ack's the packet. Below is a 1 line fix under sub send_data : elsif($opname eq 'ack') { $opcode = &TFTP_OPCODE_ACK; $data = q(); + $client->retries = $self->retries; $n = $client->last_block; $done = $client->almost_done; } @@ -370,7 +371,7 @@ if($bytes) { $self->log(trace => $client, "sent $opname $n"); - $client->retries = $self->retries; $client->timestamp = time; $self->cleanup($client) if($done); } Cheers Brendan
Sorry for not testing this. I'm not actively using this module anymore, so tests are indeed welcome. Anyway - I'va applied the patch. Will be part of 0.0301.