Bugs item #3003705, was opened at 2010-05-19 00:45
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3003705&group_id=976
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: TFTP
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Eric Mertens (glguy)
Assigned to: Daniel Stenberg (bagder)
Summary: cUrl sends invalid timeout value
Initial Comment:
Due to the bug I previously reported cUrl is now sending invalid values for the timeout. Previously these invalid value were on the wrong key and were ignored.
http://tools.ietf.org/html/rfc2349
#secs
The number of seconds to wait before retransmitting, specified
in ASCII. Valid values range between "1" and "255" seconds,
inclusive. This is a NULL-terminated field.
cUrl sends 300 for the retransmit interval, though I suspect something like 1 or 5 seconds would be more reasonable. 5 minutes seems a bit high!
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Date: 2010-05-21 23:31
Message:
Thanks a lot for your report. I decided to leave the timeout option in
there just to still allow it to be set and to make it easier for future
tweaks, should they become necessary. committed and pushed to git now!
----------------------------------------------------------------------
Comment By: Eric Mertens (glguy)
Date: 2010-05-20 21:02
Message:
I think that this patch makes sense. It is my understanding that the
"timeout" option negotiates the amount of time for client and server to
wait for a response before retransmitting a single packet.
Alternatively, it might make sense to not specify the timeout interval at
all, since before that recent patch curl was not actually specifying a
timeout interval and everyone was happy. (This would enable the
elimination of the relevant code as a server should never propose an option
that the client did not.)
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Date: 2010-05-20 19:42
Message:
I'm not an TFTP expert so I'm not completely clear over what the timeout is
used for. But what about a patch like this:
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -526,8 +526,8 @@ static CURLcode tftp_send_first(tftp_state_data_t
*state, tf
TFTP_OPTION_BLKSIZE);
sbytes += tftp_option_add(state, sbytes,
(char *)state->spacket.data+sbytes, buf );
- /* add timeout option, this is the max time the session may live */
- snprintf( buf, sizeof(buf), "%d", state->retry_time*state->retry_max
);
+ /* add timeout option */
+ snprintf( buf, sizeof(buf), "%d", state->retry_time );
sbytes += tftp_option_add(state, sbytes,
(char *)state->spacket.data+sbytes,
TFTP_OPTION_INTERVAL);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3003705&group_id=976
Received on 2010-05-22