projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dfcea3
)
networkd: send dhcp option NTP when UseNTP is true (#6726)
author
juga0
<juga@riseup.net>
Tue, 5 Sep 2017 10:26:32 +0000
(10:26 +0000)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 5 Sep 2017 10:26:32 +0000
(12:26 +0200)
src/network/networkd-dhcp4.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-dhcp4.c
b/src/network/networkd-dhcp4.c
index
7777168
..
84a25b1
100644
(file)
--- a/
src/network/networkd-dhcp4.c
+++ b/
src/network/networkd-dhcp4.c
@@
-635,10
+635,11
@@
int dhcp4_configure(Link *link) {
return r;
}
- /* Always acquire the timezone and NTP */
- r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NTP_SERVER);
- if (r < 0)
- return r;
+ if (link->network->dhcp_use_ntp) {
+ r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NTP_SERVER);
+ if (r < 0)
+ return r;
+ }
r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NEW_TZDB_TIMEZONE);
if (r < 0)