[
https://issues.apache.org/jira/browse/NET-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539838
]
Bob Luse commented on NET-172:
------------------------------
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..
> NTP client should not bind to the local port when using UDP
> -----------------------------------------------------------
>
> Key: NET-172
> URL: https://issues.apache.org/jira/browse/NET-172
> Project: Commons Net
> Issue Type: Bug
> Affects Versions: 1.4
> Environment: Windows and Linux
> Reporter: Bob Luse
> Priority: Critical
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.