tftpd: Fix max block size calculation.
Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D38953
This commit is contained in:
parent
175a4d1042
commit
a6dfd2015c
@ -230,6 +230,7 @@ option_blksize(int peer)
|
||||
tftp_log(LOG_ERR, "sysctl: net.inet.udp.maxdgram");
|
||||
return (acting_as_client ? 1 : 0);
|
||||
}
|
||||
maxdgram -= 4; /* leave room for header */
|
||||
|
||||
int size = atoi(options[OPT_BLKSIZE].o_request);
|
||||
if (size < BLKSIZE_MIN || size > BLKSIZE_MAX) {
|
||||
|
Loading…
Reference in New Issue
Block a user