Skip to content

Commit

Permalink
[ntp]: Fix NTP sync while using DHCP (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hnydyn Nazar authored and Shuotian Cheng committed Oct 14, 2017
1 parent 1a748ee commit 118c2dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions files/image_config/ntp/ntp.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ server {{ ntp_server }} iburst

#only listen on localhost and eth0 ips (default is to listen on all ip addresses)
interface ignore wildcard
{% if MGMT_INTERFACE %}
{% for (mgmt_intf, mgmt_prefix) in MGMT_INTERFACE %}
interface listen {{ mgmt_prefix | ip }}
{% endfor %}
{% else %}
interface listen eth0
{% endif %}
interface listen 127.0.0.1

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

0 comments on commit 118c2dd

Please sign in to comment.