diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-07-04 20:40:01 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-07-04 20:40:40 +0200 |
commit | 8638fda374b06d6775e78bccbb61368fe0637afb (patch) | |
tree | e546d5c1246bb680496c08ad00477ab776eb456c /src/conf_mode/ntp.py | |
parent | 2aab1a726a2083e943df1f6c4200e1ba30b50f33 (diff) | |
download | vyos-1x-8638fda374b06d6775e78bccbb61368fe0637afb.tar.gz vyos-1x-8638fda374b06d6775e78bccbb61368fe0637afb.zip |
ntp: T4456: call verify_vrf() before individual interface validation
It makes no sense to test against a VRF that might not exist at all.
(cherry picked from commit 171b224c1cf1303a608725ec74b545902daa243e)
Diffstat (limited to 'src/conf_mode/ntp.py')
-rwxr-xr-x | src/conf_mode/ntp.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/ntp.py b/src/conf_mode/ntp.py index d5f21d1b2..181c9e322 100755 --- a/src/conf_mode/ntp.py +++ b/src/conf_mode/ntp.py @@ -50,6 +50,8 @@ def verify(ntp): if 'allow_clients' in ntp and 'server' not in ntp: raise ConfigError('NTP server not configured') + verify_vrf(ntp) + if 'interface' in ntp: # If ntpd should listen on a given interface, ensure it exists for interface in ntp['interface']: @@ -63,7 +65,6 @@ def verify(ntp): raise ConfigError(f'NTP runs in VRF "{vrf_name}" - "{interface}" '\ f'does not belong to this VRF!') - verify_vrf(ntp) return None def generate(ntp): |