Skip to content

Releases: pin/tftp

Server `Shutdown` and broadcast request handling fix

12 Nov 07:55
@pin pin
71d1b5e
Compare
Choose a tag to compare
  • Broadcast request handling fix: #89
  • Server Shutdown call blocks until outstanding transfers are finished: #92

Note: This is the last release that is compatible with golang >= 1.13, the next release will require golang >= 1.17. This is due to golang.org/x/net dependency.

Module compatibility

21 Jul 07:17
@pin pin
b9ccc54
Compare
Choose a tag to compare

Adds module compatibility. Originally modules was introduced when github.com/pin/tftp package was already tagged with major version v2. So v2 became incompatible and recommended way to move forward is to cut the new major version just for the sake of module compatibility.

Branch master will be used to develop v3 for now.
Branch v2 is to keep the head of major version v2.

Note, API-wise v2 and v3 are identical. Also I believe there is no users of v1 in the wild because it had pretty short lifespan long time ago.

So it must be absolutely safe for anyone to move to v3 anytime. I don't think we will see any new v2 subversion therefore.

Fixes before the module

20 Jul 10:18
@pin pin
7416eb4
Compare
Choose a tag to compare

This package is behind on module Golang train.

Plan is to release v3 version that is fully compatible with Golang modules. For now the plan is to keep v2 an incompatible fully with modules (which is legit case).

So possibly the last TFTP package version before module compatibility changes.

RequestTSize, LocalIP, SetBlockSize, and more

16 Aug 08:44
@pin pin
0161c5d
Compare
Choose a tag to compare

New features:

  • LocalIP returns the IP address and port we are servicing the request on.
  • SetBlockSize option in the client.
  • "anticipation winow" support for tftpd32.
  • Single port mode.
  • Better transfer stats.

Backward-compatible with previous release.

Better TSize support, source IP/port check and more

25 Aug 18:41
@pin pin
Compare
Choose a tag to compare

New Features (fully backward-compatible):

  • Uses Seek in case sender asked to send tsize option and io.Reader provided to ReadFrom method satisfy io.Seeker interface. In many cases (e.g. when os.File is used as an argument to ReadFrom) there is no need anymore to explicitly SetSize using OutgoingTransfer interface.
  • Default backoff jitter can be can be overridden in clients and servers by providing a custom backoff calculation function. See SetBackoff method. Implemented by @acd
  • RemoteAddr method allows retrieving remote peer's IP address and port. It can be particularly useful for logging from inside request handlers. Implemented by @acd

Protocol implementation improvements by @acd:

  • Remote port / TID check during transmission.
  • Remote IP address check (necessary due to the use of unconnected UDP sockets).

Fixes:

  • Close UDP connection at the end of a transfer. No connections piling up on OS X anymore, no need to bump ulimit to allow more open file descriptors.
  • Correct server IP in unit-tests allows reliable unit-tests execution on OS X. It was discovered during remote IP check testing and was fixed by @acd. No test flaps on OS X anymore.

Introducing new API

07 Jul 00:38
@pin pin
Compare
Choose a tag to compare

API was changed significantly to improve efficiency and make the package more aligned with Go coding best practices and make it more cohesive to io interfaces.

Features and changes:

  • set of supported features is sufficient to implement PXE-boot server (blksize, tsize options)
  • io.ReaderFrom / io.WriterTo based implementation allows minimal memory copying during data transfer
  • netascii transfer mode support

Server and Client code before API change

04 Apr 23:24
@pin pin
Compare
Choose a tag to compare

Use import "gopkg.in/pin/tftp.v1"