summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-08-31 17:34:19 +0200
committerGitHub <noreply@github.com>2023-08-31 17:34:19 +0200
commit8e9709002abf2ba5784153025511e296724ff128 (patch)
treed8d853af037ecdafcccb7fdf575e975960341164 /src
parentabf824cddbb5712e92322c9137b2280d9fd3db63 (diff)
parent655700538592048c78306f951616cee5de7edbef (diff)
downloadvyos-1x-8e9709002abf2ba5784153025511e296724ff128.tar.gz
vyos-1x-8e9709002abf2ba5784153025511e296724ff128.zip
Merge pull request #2166 from sever-sever/T5506-eq
T5506: Add link-local IPv6 address for container interfaces
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/container.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index 667d08f8c..6284caa97 100755
--- a/src/conf_mode/container.py
+++ b/src/conf_mode/container.py
@@ -25,6 +25,7 @@ from vyos.config import Config
from vyos.configdict import dict_merge
from vyos.configdict import node_changed
from vyos.configdict import is_node_changed
+from vyos.ifconfig import Interface
from vyos.util import call
from vyos.util import cmd
from vyos.util import dict_search
@@ -466,6 +467,13 @@ def apply(container):
if disabled_new:
call('systemctl daemon-reload')
+ if 'network' in container:
+ for network, network_config in container['network'].items():
+ network_name = f'pod-{network}'
+ if os.path.exists(f'/sys/class/net/{network_name}'):
+ tmp = Interface(network_name)
+ tmp.add_ipv6_eui64_address('fe80::/64')
+
return None
if __name__ == '__main__':