diff options
author | Tom Gundersen <teg@jklm.no> | 2014-05-19 18:42:14 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-05-19 18:42:14 +0200 |
commit | bcb7a07e0a785bda1eed658e984ff6b4a11cba9a (patch) | |
tree | ca7b9498783bac32e153b2059cea24863a6642e4 /src/network/networkd-address.c | |
parent | d408b506814a0f99590d946b3bf99b57ba78336b (diff) |
networkd/sd-network: expose statically configured NTP servers
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r-- | src/network/networkd-address.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 34863b2f69..afd36a0dfc 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -335,8 +335,18 @@ int config_parse_dns(const char *unit, return 0; } - LIST_FIND_TAIL(addresses, network->dns, tail); - LIST_INSERT_AFTER(addresses, network->dns, tail, n); + if (streq(lvalue, "DNS")) { + LIST_FIND_TAIL(addresses, network->dns, tail); + LIST_INSERT_AFTER(addresses, network->dns, tail, n); + } else if (streq(lvalue, "NTP")) { + LIST_FIND_TAIL(addresses, network->ntp, tail); + LIST_INSERT_AFTER(addresses, network->ntp, tail, n); + } else { + log_syntax(unit, LOG_ERR, filename, line, EINVAL, + "Key is invalid, ignoring assignment: %s=%s", lvalue, rvalue); + return 0; + } + n = NULL; return 0; |