Ticket UUID: | 905132 | |||
Title: | time.tcl (version 1.8) fails to catch TCP connection timeout | |||
Type: | Bug | Version: | None | |
Submitter: | alathar | Created on: | 2004-02-26 15:30:36 | |
Subsystem: | None | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2004-02-27 05:42:33 | |
Resolution: | Accepted | Closed By: | patthoyts | |
Closed on: | 2004-02-26 22:11:12 | |||
Description: |
time.tcl fails to catch a timeout on the TCP socket connect, though it handles the UDP situation correctly. When used in TCP mode, either without the UDP package loaded or by specifying -protocol tcp, if there is nothing listening on the port of the specified server, the program ends with "connection refused". Also - this package is MISREPRESENTED. It does NOT implement the Network Time Protocol, RFC 1305, port 123, nor does it claim to. It implements RFC 868, the system-independent time protocol, port 37, often implemented with other "simple server" protocols, like echo, chargen, and so forth (on Unix-derived systems, right in inetd). Whoever registered this within the tcl offering as NTP didn't do their homework. To make matters worse, if you really connect this thing to the REAL ntp on port 123, it doesn't recognize the fact, and it returns a WRONG VALUE. If I get time, I'll see if I can get it to return an error instead of a wrong value, but with the early, simple protocols, that's not always practical. I will also see how difficult it would be to get a value from the REAL NTP, though I'm not going to attempt to implement the convergence algorithms, just grab the time - though that isn't quite what it was intended for. | |||
User Comments: |
alathar added on 2004-02-27 05:42:33:
Logged In: YES user_id=984964 Thanks for applying the patch! As for the rest, sorry - I confused "an" NTP with "THE" NTP. <sheepish grin> patthoyts added on 2004-02-27 05:11:12: Logged In: YES user_id=202636 Patch applied. It's not misrepresented. The Network Time Protocols module in tcllib is intended to collect implementations of such protocols. The first one in happens to be RFC 868 TIME as is clearly stated at the top of both the man page and the tcl code itself. Somewhere I have 90% of an implementation of RFC 1035 but it hasn't gone in yet. I'll see about checking the protocol -- although I don't think RFC 868 can really handle that. alathar added on 2004-02-26 22:30:36: File Added - 78104: time.tcl-patch |
Attachments:
- time.tcl-patch [download] added by alathar on 2004-02-26 22:30:36. [details]