| Summary: | TFTP can not handle big files (> 32MBytes) | ||
|---|---|---|---|
| Product: | Base System | Reporter: | ph.jounin <ph.jounin> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Fixed in rev 1.6 of tftp.c. |
A big file (more than 32MBytes) can not been downloaded/uploaded whith the current TFTP client. After sending/receiving the segment #65535, TFTP waits for the segment #65536 which can not be produced, since TFTP protocol reserves only 2 bytes for packet number. I have not checked if the TFTP server has the same limitation. Fix: The following lines in the file /usr.bin/tftp/tftp.c should include u_short cast : 165, 176, 269, 279 For instance if (ap->th_block == (block-1)) { should be fixed in if (ap->th_block == (u_short) (block-1)) { How-To-Repeat: Transfer a big file and use a correct TFTP server.