ntp: allow online/offline state to be selected by connectability

Allow SRC_MAYBE_ONLINE to be specified for new NTP sources and
connectivity setting to select between SRC_ONLINE and SRC_OFFLINE
according to the result of the connect() system call, i.e. check whether
the client has a route to send its requests.
This commit is contained in:
Miroslav Lichvar
2018-05-24 15:17:53 +02:00
parent ce6b896948
commit 8b9021bf34
4 changed files with 27 additions and 1 deletions

View File

@@ -32,6 +32,7 @@
typedef enum {
SRC_OFFLINE,
SRC_ONLINE,
SRC_MAYBE_ONLINE,
} SRC_Connectivity;
typedef struct {