summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-07 16:42:27 +0200
committerGitHub <noreply@github.com>2022-07-07 16:42:27 +0200
commit7b998593c931757994a8965999366f2d7c9c93f3 (patch)
tree1a7b3c6f054bf700ad5b857e1ba037bd5c9ddc92 /data
parent5b563a78e1bd20c03a77527052585f025d6e7b4b (diff)
parent8638fda374b06d6775e78bccbb61368fe0637afb (diff)
downloadvyos-1x-7b998593c931757994a8965999366f2d7c9c93f3.tar.gz
vyos-1x-7b998593c931757994a8965999366f2d7c9c93f3.zip
Merge pull request #1390 from c-po/t4456-ntp-equuleus
ntp: T4456: support listening on specified interface (equuleus)
Diffstat (limited to 'data')
-rw-r--r--data/templates/ntp/ntpd.conf.tmpl13
1 files changed, 10 insertions, 3 deletions
diff --git a/data/templates/ntp/ntpd.conf.tmpl b/data/templates/ntp/ntpd.conf.tmpl
index e7afcc16b..30bfd575d 100644
--- a/data/templates/ntp/ntpd.conf.tmpl
+++ b/data/templates/ntp/ntpd.conf.tmpl
@@ -33,10 +33,17 @@ restrict {{ address|address_from_cidr }} mask {{ address|netmask_from_cidr }} no
{% endfor %}
{% endif %}
-{% if listen_address %}
+{% if listen_address is defined or interface is defined %}
# NTP should listen on configured addresses only
interface ignore wildcard
-{% for address in listen_address %}
+{% if listen_address is defined %}
+{% for address in listen_address %}
interface listen {{ address }}
-{% endfor %}
+{% endfor %}
+{% endif %}
+{% if interface is defined %}
+{% for ifname in interface %}
+interface listen {{ ifname }}
+{% endfor %}
+{% endif %}
{% endif %}