Skip to content

Commit

Permalink
Fix NTP warnings after restarting the service
Browse files Browse the repository at this point in the history
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
  • Loading branch information
fastiuk committed Jul 4, 2023
1 parent 3f6a693 commit 6f46ee7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions files/image_config/ntp/ntp.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ config -#}

{{ config.association_type }} {{ config_as }}{{ soptions }}
{% if global.server_role == 'disabled' %}
restrict {{ config_as }} kod nomodify notrap noquery{{ aoptions }}
restrict {{ config_as }} kod limited nomodify notrap noquery{{ aoptions }}
{% endif %}

{% endfor -%}
Expand Down Expand Up @@ -153,8 +153,8 @@ that -#}

# Access control configuration
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify noquery{{ options }}
restrict -6 default kod notrap nomodify noquery{{ options }}
restrict -4 default kod limited notrap nomodify noquery{{ options }}
restrict -6 default kod limited notrap nomodify noquery{{ options }}

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
Expand Down
6 changes: 3 additions & 3 deletions src/sonic-config-engine/tests/sample_output/py3/ntp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ server 10.20.30.50 key 42 iburst version 3
restrict 10.20.30.50 kod limited nomodify notrap noquery nopeer

pool pool.ntp.org iburst version 3
restrict pool.ntp.org kod nomodify notrap noquery
restrict pool.ntp.org kod limited nomodify notrap noquery


keys /etc/ntp.keys
Expand All @@ -34,8 +34,8 @@ interface listen 127.0.0.1

# Access control configuration
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify noquery nopeer
restrict -6 default kod notrap nomodify noquery nopeer
restrict -4 default kod limited notrap nomodify noquery nopeer
restrict -6 default kod limited notrap nomodify noquery nopeer

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
Expand Down

0 comments on commit 6f46ee7

Please sign in to comment.