Issue Details (XML | Word | Printable)

Key: NET-172
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Bob Luse
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Net

NTP client should not bind to the local port when using UDP

Created: 09/Oct/07 01:10 AM   Updated: 20/Feb/08 02:26 PM
Return to search
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 2.0

Time Tracking:
Not Specified

Environment: Windows and Linux

Resolution Date: 20/Feb/08 02:26 PM


 Description  « Hide
NTP client when using UDP should not bind to port 123 on the local system. This renders the software unusable for the very common case where you also have an NTP server running on your system. It should send to port 123 on the server, but the client should not bind to the local port 123.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Bob Luse added a comment - 03/Nov/07 05:42 AM
This is from the documentation:

"To use the class,
merely open a local datagram socket with open
and call getTime to retrieve the time. Then call
close
to close the connection properly.
Successive calls to getTime are permitted
without re-establishing a connection. That is because UDP is a
connectionless protocol and the Network Time Protocol is stateless."

This is wrong.? There is no need to "establish a connection" at all since UDP is connectionless and NTP is stateless.? You do not need to set up a connection and then close it.? You only need to send the packets.? All this does is slow down the initial call and cause the client to completely fail when there is an NTP Server on the same system as the client since the server will already be bound to port 123..