diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-11-19 10:26:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-19 10:26:04 +0000 |
commit | 8f76c96cb4d7132b7654aa5f37e8ab49fa2e137a (patch) | |
tree | 7c54f39246450265a8fe0508681f47699f7089b1 /src | |
parent | 99f414cc69730cb5a33c6d1891e6f7e5e4f3dd16 (diff) | |
parent | f3da16e0da459027c1552b50f8a722cd75050630 (diff) | |
download | vyos-1x-8f76c96cb4d7132b7654aa5f37e8ab49fa2e137a.tar.gz vyos-1x-8f76c96cb4d7132b7654aa5f37e8ab49fa2e137a.zip |
Merge pull request #4195 from nvollmar/T6884
T6884: adds mtu option for container networks
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/container.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py index 14387cbbf..a7dc33d9d 100755 --- a/src/conf_mode/container.py +++ b/src/conf_mode/container.py @@ -419,12 +419,18 @@ def generate(container): 'dns_enabled': True, 'ipam_options': { 'driver': 'host-local' + }, + 'options': { + 'mtu': '1500' } } if 'no_name_server' in network_config: tmp['dns_enabled'] = False + if 'mtu' in network_config: + tmp['options']['mtu'] = network_config['mtu'] + for prefix in network_config['prefix']: net = {'subnet': prefix, 'gateway': inc_ip(prefix, 1)} tmp['subnets'].append(net) |