Skip to content

Commit 118c2dd

Browse files
Hnydyn NazarShuotian Cheng
Hnydyn Nazar
authored and
Shuotian Cheng
committed
[ntp]: Fix NTP sync while using DHCP (#1035)
1 parent 1a748ee commit 118c2dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

files/image_config/ntp/ntp.conf.j2

+4
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ server {{ ntp_server }} iburst
2929

3030
#only listen on localhost and eth0 ips (default is to listen on all ip addresses)
3131
interface ignore wildcard
32+
{% if MGMT_INTERFACE %}
3233
{% for (mgmt_intf, mgmt_prefix) in MGMT_INTERFACE %}
3334
interface listen {{ mgmt_prefix | ip }}
3435
{% endfor %}
36+
{% else %}
37+
interface listen eth0
38+
{% endif %}
3539
interface listen 127.0.0.1
3640

3741
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for

0 commit comments

Comments
 (0)