tftpd: reject unknown opcodes
authorasomers <asomers@FreeBSD.org>
Sat, 10 Mar 2018 01:50:43 +0000 (01:50 +0000)
committerasomers <asomers@FreeBSD.org>
Sat, 10 Mar 2018 01:50:43 +0000 (01:50 +0000)
commita6bc631948d8159e0f3d2b73083e1fec9c61f831
treead25909be22ced15168db11e24c1a17b34089664
parentc29c7eb33ffc219f472c5aa5fe85fe71e13c9438
tftpd: reject unknown opcodes

If tftpd receives a command with an unknown opcode, it simply exits 1.  It
doesn't send an ERROR packet, and the client will hang waiting for one.  Fix
it.

PR: 226005
MFC after: 3 weeks
libexec/tftpd/tests/functional.c
libexec/tftpd/tftpd.c