summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-12-12 21:24:09 +0100
committerGitHub <noreply@github.com>2024-12-12 21:24:09 +0100
commit4221687fc7a0482b13a79358f9b0d085ec0835f6 (patch)
treed5cb9c6cb62692aef2deb5f2deedf7586b60e422 /src
parent678c6cd00412cad5d788da210c6dfeae6e77907c (diff)
parent2de9fc6c1c0ee4fb814bb48cfe8b260453f80436 (diff)
downloadvyos-1x-4221687fc7a0482b13a79358f9b0d085ec0835f6.tar.gz
vyos-1x-4221687fc7a0482b13a79358f9b0d085ec0835f6.zip
Merge pull request #4232 from nvollmar/T6927
T6927: adds option to set container name server
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/container.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index 4d3962029..594de3eb0 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -148,6 +148,9 @@ def verify(container):
if network_name not in container.get('network', {}):
raise ConfigError(f'Container network "{network_name}" does not exist!')
+ if 'name_server' in container_config and 'no_name_server' not in container['network'][network_name]:
+ raise ConfigError(f'Setting name server has no effect when attached container network has DNS enabled!')
+
if 'address' in container_config['network'][network_name]:
cnt_ipv4 = 0
cnt_ipv6 = 0