Callisto82/tftp.net

TftpTransfer fallsbacks to default rather than proposed?

Closed this issue · 3 comments

internal void FinishOptionNegotiation(TransferOptionSet negotiated)
{
NegotiatedOptions = negotiated;
if (!NegotiatedOptions.IncludesBlockSizeOption)
NegotiatedOptions.BlockSize = TransferOptionSet.DEFAULT_BLOCKSIZE;
if (!NegotiatedOptions.IncludesTimeoutOption)
NegotiatedOptions.Timeout = TransferOptionSet.DEFAULT_TIMEOUT_SECS;
}

Is there a reason behind this? This essentially blows away whatever settings are currently set on TftpTransfer. The TFTP server I am uploading to does not support option negotiation and must have a block size of 256, which is currently not possible as the code stands.

You are correct. The current operation is correct according to the spec. This issue should probably be closed. The server I am interacting is on an embedded device. It is very basic and I have no control over it. It does not follow the spec and uses a block size of 256.

It would be nice if this library offered a way to disable negotiation and force certain options.

I know this is a closed issue, but I've run up against a similar issue where the embedded server doesn't support negotiation and even trying to negotiate is causing issues. some way of disabling that altogether would be useful to some people.