tftpd: try to handle duplicate WRQ packets
commit2864d83feaac090865acb9c147c17d9793ef53dc
authorH. Peter Anvin <hpa@zytor.com>
Fri, 13 May 2011 02:16:17 +0000 (12 19:16 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 13 May 2011 02:16:17 +0000 (12 19:16 -0700)
tree4fd454ca00003dbf8388e6b5b88bb31f603f6bd3
parent05ffcecaa8bbaedc81b42ea240f34f2ad0b5f126
tftpd: try to handle duplicate WRQ packets

Duplicate WRQ packets can really hurt, since they end up accessing the
same file.  This attempts to lock the file, which should work for the
case where a correctly implemented TFTP stack uses the same session ID
(port number) for each retry; in any other case they look like
multiple sessions to the same file and it is a crapshoot if we end up
with the correct one.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
configure.in
tftpd/tftpd.c