Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
The current situation is that a failed timeserver name resolution
removes the timeserver immediately from the list of used timeservers
and failing to connect to the nameserver IP address removes the
timeserver after a 2 second delay. Currently no mechanism exists to
re-create the list of nameservers once the list has been exhausted or
the more preferred timeservers have been removed from it.
This implementation combats both problems where less used timeservers
further away end up being used despite a more optimal closer one
becoming available as well as the problem of exhausting the
nameserver list. This is done by periodially waking up and checking
the timeserver in use. If the timeserver in use is not the most
preferred one or the list of timeservers is empty, the timeserver
list is recreated and the timeserver polling procedure is restarted.
|
|
If the time update method is manual, no NTP time servers are returned.
|
|
This patch adds an analagous debug message when starting NTP against a
resolved server as when starting against a numbered server.
|
|
|
|
If we get more than one IP address, then add those
server addresses to the time server list so that they
can be tried if the first entry fails.
|
|
|
|
|
|
|
|
|
|
|
|
In order to be able to request a certain ipconfig type, add the type
as a parameter to __connman_ipconfig_get_gateway_from_index().
|
|
A VPN does not have a network struct set. Thus do not attempt to
look up the corresponding interface index for a NULL network
pointer.
Fixes BMC#25075
|
|
|
|
Factor out code that creates the timeserver list in
__connman_timeserver_sync().
|
|
|
|
|
|
In order to cancel any ongoing resolution, check
if both resolv and resolv_id are valid.
|
|
Add Fallback timeservers via main.conf.
These timeservers are used for time corrections when
there are no valid timeservers provided by the user or by the
network. The list of timeservers which are queried for
timing correction are Timeservers.Configuration (set by the
user), service timeservers(via service), gateway, global
timeservers (via clock API) and fallback timeservers, in that order.
|
|
Add Timeservers.Configuration timerservers (if any) to the list of
timeservers for time correction query. Now the Order is
Timeserver.Config (via the user), service timeserver (via DHCP).
default gateway (system), global timeservers (via the user).
|
|
Add default service gateway to the timeserver query list.
Now the list is service timeservers (via DHCP), gateway and global
timeservers, in that order.
|
|
Create a timeserver list for NTP query. This list consists of
timeserver provided via DHCP and the ones set by user in that
order. We recreate this list everytime the default service changes
or one of the timeserver values change.
Use getaddrinfo to determine if the timeserver is a domain name or
a IP address.
|
|
Trigger NTP sync on default service going to READY/ONLINE state
instead of triggering NTP sync on ONLINE state only. This makes
sense for local ntp servers even if the wispr check fails.
|
|
Fixes BMC#24997.
|
|
|
|
We do not need to these anymore as we directly use the timeservers from
service.
|
|
if we are using service timeservers, then do not restart
ntp if the user modifies system timeservers.
|
|
|
|
Add a timeout mechanism to switch to next system timeserver
if the current one does not respond or is a bogus one.
|
|
__connman_timerserver_sync() resolves system timeservers one at a time
and queries the resolved server or the 1st of the resolved servers for
time correction. If the resolution fails it resolves the next one.
__connman_timerserver_sync_next() resolves the next system timeserver.
__connman_timerserver_stop() stops this query.If the user modifies the
system timeserver list, we restart the ntp process.
|
|
|
|
|
|
Reported by: DJ Cozatt <ygdrasil@comcast.net>
|
|
We want to keep the server pointer constant.
|
|
The timeserver API now includes a sync() call in order to separate
timeserver peer addition from actual time syncing.
|
|
|
|
|