tftpd: handle rule filter flags more cleanly
commit351907e3f0021876abeba14ac47081cf2c21b50a
authorH. Peter Anvin <hpa@zytor.com>
Thu, 30 May 2024 00:28:53 +0000 (29 17:28 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 30 May 2024 00:28:53 +0000 (29 17:28 -0700)
tree273ecb6e31e310aafdaa041c84db5ee2e5c32292
parent6f96fcd1b669dbf9c0a3d96d26d370117fddcadd
tftpd: handle rule filter flags more cleanly

Instead of a bunch of ad hoc tests, keep a bitmask of flags that would
keep this rule from being executed. This also removes the ugly hack of
converting the request mode between opcode and character encodings for
really no good reason.

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