Date: Wed, 25 Jun 1997 17:59:53 -0400 From: Marc Evans <marc@destek.net> To: freebsd-bugs@freebsd.org Subject: tftpd bug Message-ID: <199706252159.RAA09369@synergy.Destek.Net>
next in thread | raw e-mail | index | archive | help
Hello - It appears that there is a long-standing bug in tftp, in that files greater then 16M bytes fail to transfer. A closer look at the issue appears to reveal that the problem is caused by /usr/include/arpa/tftp.h which with the following modifications may work better (e.g., I haven't yet tested this): diff -c /usr/include/arpa/tftp* *** tftp.h Wed Jun 25 17:28:20 1997 --- tftp.h.orig Wed Jun 25 17:28:17 1997 *************** *** 52,60 **** #define ERROR 05 /* error code */ struct tftphdr { ! unsigned short th_opcode; /* packet type */ ! unsigned short th_block; /* block # */ ! char th_data[1]; /* data or error string */ }; #define th_code th_block /* error code overlay on tu_block */ --- 52,60 ---- #define ERROR 05 /* error code */ struct tftphdr { ! short th_opcode; /* packet type */ ! short th_block; /* block # */ ! char th_data[1]; /* data or error string */ }; #define th_code th_block /* error code overlay on tu_block */ In other words, there appears to be a wrap-around bug due to the datatype being used. - Marc =============================================================================== Marc Evans WB1GRH The Destek Networking Group E-Mail: Marc@Destek.NET One Indian Head Plaza URL: http://WWW.Destek.NET/~marc Nashua, NH, USA 03060 MIME-1.0 & Enriched-Text mail accepted 603 594 9630 (V) 598 8864 (F) PGP-2.6 key available upon request WAN & Internet Services PGP-2.6 Fingerprint: 20 7C A2 DB 17 B2 21 80 47 AA B9 CD D9 DE 31 CC The XFree86[tm] Project, Inc. Industry Liason <Marc@XFree86.Org> ===============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706252159.RAA09369>