-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Often firmware tufts clients send file size probes, sending read request with tsize 0 and send error 8 OptionNegotiationFailed as described for example in https://osqa-ask.wireshark.org/questions/22519/tftp-transfer-option-negotiation-failed-error-8-packet-trace/.
Bellow is the relevant rfc:
If the client rejects the OACK, then it sends an ERROR packet, with error code 8, to the server and the transfer is terminated.
https://github.com/oblique/async-tftp-rs/blob/master/rfcs/rfc2347.txt#L210
But we ignore all client packets other than acks,
https://github.com/oblique/async-tftp-rs/blob/master/src/server/read_req.rs#L226 . This leads to half of the firmware originating requests to retransmit first window until they exceed the timeout. I would like to fix this (handle clients aborting the transfer) and also provide some feedback to the handler that this request was aborted by the client and what ware the requested option so it could decide to treat those probe requests differently for logging purposes.
I noticed the comment in recv_ack() // parse only valid Ack packets, the rest are ignored and I wander if you have opinions on changing that behavior ?