]> git.ipfire.org Git - thirdparty/chrony.git/commit
Fix crash with duplicated initstepslew address
authorvictor lum <viclum@vanu.com>
Fri, 26 Apr 2013 12:36:17 +0000 (14:36 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 26 Apr 2013 12:36:17 +0000 (14:36 +0200)
commit4933c216b2f8936930c8557095a0bf269841656d
tree809c56c4fcf17dce6967c794a9cccda03e3f70a0
parent0655def57f0422cb67640d7093dc001889fe0021
Fix crash with duplicated initstepslew address

When there are duplicate ntp servers listed on the initstepslew line, 2
SourceRecords are created (sourceA and sourceB), and two timers are
created (timerA and timerB).  When ntp responses are received, only
sourceA is updated because of the way read_from_socket searches for a
matching record.  Eventually, the criteria for sourceA are met, causing
timerA to stop and n_completed_sources to increment.  timerB continues
to trigger, sending ntp poll messages to the ntp server.  Responses from
that server are assigned to sourceA, triggering the criteria for sourceA
and causing n_completed_sources to increment improperly.  Once this
happens enough times, n_complete_sources == number of servers and all
SourceRecords are deleted.  The next time timerB triggers, it attempts
to access sourceB, which was already been deleted, causing the core.
acquire.c