diff options
author | Dave Vogel <dave.vogel@fullpower.com> | 2024-09-03 12:13:04 -0700 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-12 05:27:43 +0000 |
commit | 2ea1152f305354ba0e94ae3dadabf05f1f490989 (patch) | |
tree | 4f720a3d8aca07b321b67e07760d9981d7a69366 /src/conf_mode | |
parent | eb9e562c28d2935a3823a5522983697cf76dad52 (diff) | |
download | vyos-1x-mergify/bp/sagitta/pr-4032.tar.gz vyos-1x-mergify/bp/sagitta/pr-4032.zip |
container: T6701: add support to disable container network DNS supportmergify/bp/sagitta/pr-4032
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
(cherry picked from commit 1d5625d572cc25a9d53247b7c41177f17845b052)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/container.py | 4 |
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) |