allenap-tftp-offload

Crates.ioallenap-tftp-offload
lib.rsallenap-tftp-offload
version0.2.2
sourcesrc
created_at2016-12-06 21:09:54.651941
updated_at2022-04-04 06:42:57.663055
descriptionallenap's TFTP offload server
homepagehttps://github.com/allenap/allenap-tftp-offload
repositoryhttps://github.com/allenap/allenap-tftp-offload
max_upload_size
id7492
size20,517
Gavin Panella (allenap)

documentation

README

⚠️ Not supported

This crate is no longer supported and will not be updated. It was an experiment and is unlikely to be useful to anyone in its present state. The code itself may be a minor curiosity... but probably not. This is not the TFTP goodness you're looking for. Sorry!

allenap's TFTP offload server

This is an experimental TFTP offload server built using allenap's TFTP library for Rust.

By offload I mean that this will do the work of receiving TFTP requests and later transferring a file via TFTP, but another process — in the first instance a MAAS rackd process with small modifications — gets to decide which file to serve, and can even generate that file on-the-fly.

How to use this with MAAS on Ubuntu

This code is experimental and may break, so these instructions are deliberately sparse: if you don't understand them as you read through then you probably should not go any further.

Once the tftp-offload merge proposal has landed you can switch to running MAAS from the daily PPA. In the meantime you can build packages yourself by running make package in a checkout of lp:maas and use dpkg -i ../build-area/*.deb to install them.

Next you'll need Rust >= 1.13 to build this code. The easiest way is using rustup. This comes with cargo which you should use to fetch, build and install the allenap-tftp-offload executable:

$ cargo install allenap-tftp-offload

Create some authbind configuration:

$ sudo touch /etc/authbind/byport/69
$ sudo chown maas /etc/authbind/byport/69
$ sudo chmod u+x /etc/authbind/byport/69

(An alternative here is to run allenap-tftp-offload as root.)

Start it up as maas:

$ sudo -u maas authbind $(type -p allenap-tftp-offload) \
>   --socket /var/lib/maas/tftp-offload.socket

Then use MAAS as usual.

To do

  • Make the socket path configurable. At present it expects an offload.sock file in the working directory.
Commit count: 20

cargo fmt