summaryrefslogtreecommitdiff
path: root/src/conf_mode/container.py
diff options
context:
space:
mode:
authorDave Vogel <dave.vogel@fullpower.com>2024-09-03 12:13:04 -0700
committerChristian Breunig <christian@breunig.cc>2024-09-11 07:43:27 +0200
commit1d5625d572cc25a9d53247b7c41177f17845b052 (patch)
treed4126e05bb9aba3de392fa1eb5c37c7704f00a7a /src/conf_mode/container.py
parent57291121d680eda37689919611293aceb9a0e259 (diff)
downloadvyos-1x-1d5625d572cc25a9d53247b7c41177f17845b052.tar.gz
vyos-1x-1d5625d572cc25a9d53247b7c41177f17845b052.zip
container: T6701: add support to disable container network DNS support
Add ability to set the container network with a disable-dns setting to disable the DNS plugin that is on be default. set container network <network> no-name-server
Diffstat (limited to 'src/conf_mode/container.py')
-rwxr-xr-xsrc/conf_mode/container.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index ded370a7a..14387cbbf 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -421,6 +421,10 @@ def generate(container):
'driver': 'host-local'
}
}
+
+ if 'no_name_server' in network_config:
+ tmp['dns_enabled'] = False
+
for prefix in network_config['prefix']:
net = {'subnet': prefix, 'gateway': inc_ip(prefix, 1)}
tmp['subnets'].append(net)