opnsense-src/libexec/tftpd
Dag-Erling Smørgrav 986cceda16 tftpd: Use size_t where appropriate.
* Limit the use of `ssize_t` to only where it's needed.
* Correct one case of `int` being used for a length.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44954

(cherry picked from commit 1ed44fcc44b2c04db330663589541608135402f4)

tftpd: Clean up the tests.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44955

(cherry picked from commit 7ab7ecfcfe777f7816e3e01df5f277060b2b609a)

tftpd: Check the server status after each test.

* In the setup phase, wait for the server to start (or fail to start)
  before proceeding with the test.  This makes it possible to write test
  cases that don't expect a response from the server without ending up
  in a race over the server PID file.
* After running each test, wait up to 30 seconds for the server to exit
  and check that the exit status matches what the test case says to
  expect (usually 0).
* We still kill and collect the server in the cleanup phase, in case the
  test ended early.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44956

(cherry picked from commit 83a6e984ac01657819418746f722163367ec30db)

tftpd: Immediately reject any request shorter than 4 bytes.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44957

(cherry picked from commit 9f231af307b80eb222d9761bbd81fa4e130bb3d7)

tftpd: Untangle a conditional.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D45026

(cherry picked from commit 21b5829d28b1e02e9f30bfa439238c382dd19114)
2024-05-02 11:02:21 +02:00
..
tests tftpd: Use size_t where appropriate. 2024-05-02 11:02:21 +02:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
tftp-file.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
tftp-file.h Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
tftp-io.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
tftp-io.h Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
tftp-options.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
tftp-options.h Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
tftp-transfer.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
tftp-transfer.h Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
tftp-utils.c tftpd: Use size_t where appropriate. 2024-05-02 11:02:21 +02:00
tftp-utils.h tftpd: Use size_t where appropriate. 2024-05-02 11:02:21 +02:00
tftpd.8 Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
tftpd.c tftpd: Use size_t where appropriate. 2024-05-02 11:02:21 +02:00