[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
inetutils-1.3.2 tftp file limit 16MB
From: |
Denis Laplante |
Subject: |
inetutils-1.3.2 tftp file limit 16MB |
Date: |
Thu, 13 Dec 2001 15:06:21 -0800 |
GNU tftp and/or tftpd has a 16 Mega Byte limit on file transfers, as
demonstrated by a transfer with the following options
> tftp HOSTNAME
> bin
> verbose
> trace
> get BIGFILE
[...]
received DATA <block=32767, 512 bytes>
sent ACK <block=32767>
received DATA <block=-32768, 512 bytes>
sent ACK <block=32767>
received DATA <block=-32768, 512 bytes>
received DATA <block=-32768, 512 bytes>
sent ACK <block=32767>
sent ACK <block=32767>
sent ACK <block=32767>
Transfer timed out.
tftp>
I believe that changing the data type for tu_block to unsigned short would
raise the limit to 32M
[inetutils-1.3.2/include/arpa/tftp.h]
struct tftphdr {
short th_opcode; /* packet type */
union {
short tu_block; /* block # */
short tu_code; /* error code */
char tu_stuff[1]; /* request packet stuff */
} th_u;
char th_data[1]; /* data or error string */
};
#define th_block th_u.tu_block
#define th_code th_u.tu_code
#define th_stuff th_u.tu_stuff
#define th_msg th_data
, and changing variable 'block' in tftpd.c/tftp.c functions sendfile/recvfile
to unsigned short would result in unlimited file size, because both sides of
comparison would overflow into -32768 at the same time.
-- Denis Laplante <address@hidden> -- Network Analyst --
-- ITServices Network Engineering -- TEL: 604/822-9914 --
- inetutils-1.3.2 tftp file limit 16MB,
Denis Laplante <=