Remapping file names with TFTP-HPA for buggy PXE clients

Some PXE clients send extraneous garbage characters in TFTP requests for files, e.g. “RRQ from … filename pxelinux.biny#012;o#036”
instead of just “pxelinux.bin”. This is logged in the syslog.

To work around this we can use a feature of tftp-hpa to remap file names, based on a rewrite regex:

/etc/default/tftp-hpa:

TFTP_OPTIONS="--secure --verbose -v -m /etc/tftpd.map"

/etc/tftpd.map:

r ^pxelinux\.bin\S* pxelinux.bin

Explanation:
r = rewrite
^pxelinux\.bin\S* = match requests starting with pxelinux.bin, followed by any non-whitespace characters
pxelinux.bin = remapped filename