summaryrefslogtreecommitdiff
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-27 02:12:27 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-27 02:13:59 +0200
commit21b80ad126c1aa43bd6d0e5a7ed3cc7c0f10efb0 (patch)
tree38d07d9a8d62c1ff8bb3294b1eb95932dc380551 /src/network/networkd-dhcp4.c
parentfbcd420aa407dc3c16efd9fb32cbae6d04d4f65d (diff)
networkd: optionally push dhcp timezone into timedated
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 3082bf8ac8..4e2936f637 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -482,6 +482,18 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
}
}
+ if (link->network->dhcp_timezone) {
+ const char *tz = NULL;
+
+ (void) sd_dhcp_lease_get_timezone(link->dhcp_lease, &tz);
+
+ if (tz) {
+ r = link_set_timezone(link, tz);
+ if (r < 0)
+ log_link_error_errno(link, r, "Failed to set timezone to '%s': %m", tz);
+ }
+ }
+
if (!link->network->dhcp_critical) {
r = sd_dhcp_lease_get_lifetime(link->dhcp_lease, &lifetime);
if (r < 0) {