ntpd: Fix error "getaddrinfo: "::1" invalid host address" when IPv6 is disabled.
This commit is contained in:
parent
871a98bc2a
commit
a573e6565e
1 changed files with 2 additions and 0 deletions
|
@ -16,7 +16,9 @@ restrict -6 default nomodify notrap nopeer noquery
|
||||||
|
|
||||||
# Local users may interrogate the ntp server more closely.
|
# Local users may interrogate the ntp server more closely.
|
||||||
restrict 127.0.0.1 nomodify
|
restrict 127.0.0.1 nomodify
|
||||||
|
<% if @ipv6enabled == "true" -%>
|
||||||
restrict ::1 nomodify
|
restrict ::1 nomodify
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
# Drift file.
|
# Drift file.
|
||||||
driftfile /var/lib/ntp/ntp.drift
|
driftfile /var/lib/ntp/ntp.drift
|
||||||
|
|
Loading…
Add table
Reference in a new issue