purpleidea / mgmt

Next generation distributed, event-driven, parallel config management!
https://purpleidea.com/tags/mgmtconfig/
GNU General Public License v3.0
3.58k stars 311 forks source link

tftp resources blocks #692

Open purpleidea opened 1 year ago

purpleidea commented 1 year ago

See here: https://github.com/pin/tftp/issues/41

@vpaprots commented:

If somebody else stumbles upon this, as I did.. mine hung on a large file (~100mb). s.SetBlockSize(65456) appears to have fixed it. (This might be 'per-spec', I didn't dig all that much.. I think dnsmasq-tftp has a similar issue with block size..)

purpleidea commented 1 year ago

https://github.com/pin/tftp/blob/90a06610acdd87d99706c4ea8328b60a04d9a8e7/server.go#L144

As an aside, we should test the latest version since there is some new cancellation code in Shutdown().

But if a client was reading a super huge file, we'd want them to get disconnected perhaps... That should be something we should check to see if it occurs. Otherwise a malicious client could slow read for a long time to block us.