diff options
| author | Yoshiaki Suyama <yoshiaki.suyama@suyama.ne.jp> | 2025-03-16 01:16:55 +0900 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2025-04-18 20:45:46 +0200 |
| commit | b124f0b3b05bced1f916e9519d986d03f2b95c51 (patch) | |
| tree | d14696ac9fc86052a205423a461d647ca9718c44 /python/vyos/configdict.py | |
| parent | ab648af4c07e8a09e0a1236b661ac0ec0639ff17 (diff) | |
| download | veeos-1x-b124f0b3b05bced1f916e9519d986d03f2b95c51.tar.gz veeos-1x-b124f0b3b05bced1f916e9519d986d03f2b95c51.zip | |
interface: T4627: support IPv6 Interface Identifier (token) for SLAAC
Add common IPv6 CLI option (use ethernet as example):
set interfaces ethernet eth0 ipv6 address interface-identifier
Co-authored-by: Christian Breunig <christian@breunig.cc>
Diffstat (limited to 'python/vyos/configdict.py')
| -rw-r--r-- | python/vyos/configdict.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index 78b98a3eb..ecab5fcb0 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -517,6 +517,14 @@ def get_interface_dict(config, base, ifname='', recursive_defaults=True, with_pk else: dict['ipv6']['address'].update({'eui64_old': eui64}) + interface_identifier = leaf_node_changed(config, base + [ifname, 'ipv6', 'address', 'interface-identifier']) + if interface_identifier: + tmp = dict_search('ipv6.address', dict) + if not tmp: + dict.update({'ipv6': {'address': {'interface_identifier_old': interface_identifier}}}) + else: + dict['ipv6']['address'].update({'interface_identifier_old': interface_identifier}) + for vif, vif_config in dict.get('vif', {}).items(): # Add subinterface name to dictionary dict['vif'][vif].update({'ifname' : f'{ifname}.{vif}'}) |
