Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320417 - atftp-0.7-r1 is unable to transfer large files
Summary: atftp-0.7-r1 is unable to transfer large files
Status: RESOLVED DUPLICATE of bug 321705
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-18 15:50 UTC by Dmitry
Modified: 2010-06-14 02:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,24.55 KB, text/plain)
2010-05-18 15:53 UTC, Dmitry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 2010-05-18 15:50:53 UTC
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.
Comment 1 Dmitry 2010-05-18 15:53:15 UTC
Created attachment 231987 [details]
emerge --info
Comment 2 Dmitry 2010-05-18 15:55:53 UTC
Something similar was discussed here: http://bugs.gentoo.org/104218
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-06-14 02:22:19 UTC

*** This bug has been marked as a duplicate of bug 321705 ***