On 2015-03-24 09:46, Patrik Flykt wrote: > > The code is written to add service specific NTP servers first, then the > gateway and last but not least the fallback NTP servers. Here the > service specific NTP servers are either obtained via DHCP or manually > set. When ConnMan starts, it takes the first server from the list into > use and proceeds to the next one only if there were no replies from the > current one. So if ConnMan ends up sending NTP packets to the gateway, > it means there were no service specific NTP servers or then the service > specific NTP servers were incorrectly set up. If the default gateway > does not answer, the fallback NTP servers are used next.
Wouldn't it model the proposed use case better if the fallback servers
were tried first, and only if those don't work (because we're in a
firewalled corporate network, e.g.) the gateway? There's loads of setups
where no NTP is set, but external servers not filtered – hotspots,
consumer wifi APs, 3G, … –, and this would waste time trying to sync
with the gateway.
>
> Instead of adding more options to main.conf, the following oneliner
> makes the situation a bit smarter:
>
> --- a/src/timeserver.c
> +++ b/src/timeserver.c
> @@ -205,7 +205,7 @@ GSList *__connman_timeserver_get_all(struct
> connman_service *service)
> list = __connman_timeserver_add_list(list,
> service_ts[i]);
>
> network = __connman_service_get_network(service);
> - if (network) {
> + if (!service_ts && network) {
> index = connman_network_get_index(network);
> service_gw =
> __connman_ipconfig_get_gateway_from_index(index,
> CONNMAN_IPCONFIG_TYPE_ALL);
>
>
> HTH,
>
> Patrik
>
>
> _______________________________________________
> connman mailing list
> [email protected]
> https://lists.connman.net/mailman/listinfo/connman
>
--
Mit freundlichen Grüßen, / Best Regards,
Sven Schwedas
Systemadministrator
TAO Beratungs- und Management GmbH | Lendplatz 45 | A - 8020 Graz
Mail/XMPP: [email protected] | +43 (0)680 301 7167
http://software.tao.at
signature.asc
Description: OpenPGP digital signature
_______________________________________________ connman mailing list [email protected] https://lists.connman.net/mailman/listinfo/connman
