summaryrefslogtreecommitdiff
path: root/src/conf_mode/ntp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-13 23:02:17 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-13 23:02:17 +0200
commit7b1f1fa56f7ff7de14de7c5bc38753ceec565c0a (patch)
treec33d72ba6c410b059f8dce894b4b2bf49bc38fd0 /src/conf_mode/ntp.py
parent13f9b8fab678ee6ecd2fd124c1284bbbaa6795af (diff)
downloadvyos-1x-7b1f1fa56f7ff7de14de7c5bc38753ceec565c0a.tar.gz
vyos-1x-7b1f1fa56f7ff7de14de7c5bc38753ceec565c0a.zip
ntp: T2321: remove superfluous verify() step on network addresses
Only IP prefixes are allowed to be added by the CLI thus we can drop the same check inside the Python script to validate the prefix.
Diffstat (limited to 'src/conf_mode/ntp.py')
-rwxr-xr-xsrc/conf_mode/ntp.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/conf_mode/ntp.py b/src/conf_mode/ntp.py
index 951ebeec0..05bc962c2 100755
--- a/src/conf_mode/ntp.py
+++ b/src/conf_mode/ntp.py
@@ -91,14 +91,6 @@ def verify(ntp):
if len(ntp['allowed_networks']) and not len(ntp['servers']):
raise ConfigError('NTP server not configured')
- for n in ntp['allowed_networks']:
- try:
- addr = ip_network( n['network'] )
- break
- except ValueError:
- raise ConfigError('{network} does not appear to be a valid IPv4 or IPv6 network, '
- 'check host bits!'.format(**n))
-
return None
def generate(ntp):