When I try to download a large file via tftp, atftpd logs following error message: "Requested file to big, increase BLKSIZE". Reproducible: Always Steps to Reproduce: 1.Launch atftp-0.7-r1 on server 2.Launch tftp client on host (cisco router in my case) 3.Try to download a large file (~50 Mb) from server via tftp Actual Results: Following error is logged: "Requested file to big, increase BLKSIZE". Expected Results: File download succeeds. I tried following solutions: 1) Set --no-blksize option in /etc/conf.d/atftpd. It had no influence. 2) Patched some source files: --- atftp-0.7/tftp_def.c~ +++ atftp-0.7/tftp_def.c @@ -35,7 +35,7 @@ { "mode", "octet", 0, 1}, /* mode for transfer */ { "tsize", "0", 0, 1 }, /* RFC1350 options. See RFC2347, */ { "timeout", "5", 0, 1 }, /* 2348, 2349, 2090. */ - { "blksize", "512", 0, 1 }, /* This is the default option */ + { "blksize", "1428", 0, 1 }, /* Default value of 512 was increased (Ethernet MTU, less the TFTP, UDP and IP header lengths) */ { "multicast", "", 0, 1 }, /* structure */ { "password", "", 0, 1}, /* password */ { "", "", 0, 0} --- atftp-0.7/tftp_def.h~ +++ atftp-0.7/tftp_def.h @@ -54,3 +54,8 @@ int Gethostbyname(char *addr, struct hostent *host); #endif + +#ifdef SEGSIZE +#undef SEGSIZE +#define SEGSIZE 1428 +#endif Patching tftp_def.c alone gave no results.Changing SEGSIZE worked but it led to timeouts: Accessing tftp://192.168.31.133/c2800nm-advipservicesk9-mz.124-20.T5.bin... Loading c2800nm-advipservicesk9-mz.124-20.T5.bin from 192.168.31.133 (via FastEthernet0/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... [timed out] %Error reading tftp://192.168.31.133/c2800nm-advipservicesk9-mz.124-20.T5.bin (Timed out) I tried that several times.
Created attachment 231987 [details] emerge --info
Something similar was discussed here: http://bugs.gentoo.org/104218
*** This bug has been marked as a duplicate of bug 321705 ***