curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Behavior change with tftp after upgrading to 7.76

From: Wenyi Cheng via curl-users <curl-users_at_cool.haxx.se>
Date: Tue, 17 Aug 2021 22:33:01 -0700

Hi,

I recently upgraded curl from 7.69 to 7.76 and noticed some behavior
changes when using tftp.

In 7.69, if I try to send something to an unavailable tftp address, I will
get curl: (28) TFTP response timeout. The following is the output from 7.69
with a good address 10.243.210.248 and then the same ip but a wrong port:

$ curl -T /tmp/test tftp://10.243.210.248/test
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 9 0 0 100 9 0 1800 --:--:-- --:--:-- --:--:-- 1800
100 9 0 0 100 9 0 1500 --:--:-- --:--:-- --:--:-- 1500

$ curl -T /tmp/test tftp://10.243.210.248:1234/test
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 9 0 0 0 0 0 0 --:--:-- 0:04:59 --:--:-- 0
  0 9 0 0 0 0 0 0 --:--:-- 0:04:59 --:--:-- 0
curl: (28) TFTP response timeout

Now in 7.76, I get curl: (7) Received too short packet instantly if the
destination is unreachable:

$ curl -T /tmp/test tftp://10.243.210.248/test
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 9 0 0 100 9 0 4500 --:--:-- --:--:-- --:--:-- 4500
100 9 0 0 100 9 0 3000 --:--:-- --:--:-- --:--:-- 3000

$ curl -T /tmp/test tftp://10.243.210.248:1234/test
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 9 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  0 9 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Received too short packet

This seems to be caused by the fix of issue #6774
<https://github.com/curl/curl/issues/6774>.
Is this behavior change expected?

Thanks,
Wenyi


-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-08-18