cURL / Mailing Lists / curl-library / Single Mail

curl-library

TFTP bugs: rate limitation and upload does not work.

From: Ben Greear <greearb_at_candelatech.com>
Date: Fri, 19 Feb 2010 16:10:54 -0800

url version info:

curl 7.20.0 (i386-redhat-linux-gnu) libcurl/7.20.0 NSS/3.12.5.0 zlib/1.2.3
c-ares/1.7.0 libidn/1.16 libssh2/1.2.2
Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s rtsp
scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile SSL libz

It seems that rate-limitation doesn't work with tftp:

We see this with our app that uses libcurl too, so likely it is
a libcurl issue.

[root@gdc-f12-1 ~]# curl --limit-rate 500K -o /dev/null tftp://192.168.100.6/55MBfile
   % Total % Received % Xferd Average Speed Time Time Time Current
                                  Dload Upload Total Spent Left Speed
  99 54.8M 99 54.8M 0 0 3046k 0 0:00:18 0:00:18 --:--:-- 3046k

[root@gdc-f12-1 ~]# curl --limit-rate 800K -o /dev/null tftp://192.168.100.6/55MBfile
   % Total % Received % Xferd Average Speed Time Time Time Current
                                  Dload Upload Total Spent Left Speed
  99 54.8M 99 54.8M 0 0 3049k 0 0:00:18 0:00:18 --:--:-- 3049k

[root@gdc-f12-1 ~]# curl --limit-rate 80K -o /dev/null tftp://192.168.100.6/55MBfile
   % Total % Received % Xferd Average Speed Time Time Time Current
                                  Dload Upload Total Spent Left Speed
  99 54.8M 99 54.8M 0 0 3062k 0 0:00:18 0:00:18 --:--:-- 3062k

Uploading also fails to work with internal error. The server is Fedora 8.

[lanforge@gdc-f12-1 ~]$ curl -v -T "bthelper" tftp://192.168.100.6/bthelper*
About to connect() to 192.168.100.6 port 69 (#0)
* Trying 192.168.100.6... connected
* Connected to 192.168.100.6 (192.168.100.6) port 69 (#0)
* set timeouts for state 0; Total 300, retry 6 maxtry 50
* got option=(tsize) value=(856588)
* tsize parsed from OACK (856588)
* got option=(blksize) value=(512)
* blksize parsed from OACK (512) requested (512)
   % Total % Received % Xferd Average Speed Time Time Time Current
                                  Dload Upload Total Spent Left Speed
   0 1673k 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0*
Connected for transmit
* set timeouts for state 2; Total 3600, retry 15 maxtry 24
* tftp_tx: internal error
* got option=(tsize) value=(856588)
* tsize parsed from OACK (856588)
* got option=(blksize) value=(512)
* blksize parsed from OACK (512) requested (512)

Please let us know if we can provide any additional info. I'll start digging into
this code next week if no one comes up with something sooner.

Thanks,
Ben

-- 
Ben Greear <greearb_at_candelatech.com>
Candela Technologies Inc  http://www.candelatech.com
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-20