summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraapostoliuk <a.apostoliuk@vyos.io>2025-01-17 12:16:46 +0200
committeraapostoliuk <a.apostoliuk@vyos.io>2025-01-17 12:20:29 +0200
commit506b25f407b5b65018d1534e871e6f224804eecb (patch)
tree8fb436e7a0aafbc6fb84a2c63b189aa65ea955b6 /src
parent99d0c7a804ea3cf7f843f0d4810e6772cf7ceeb8 (diff)
downloadvyos-1x-506b25f407b5b65018d1534e871e6f224804eecb.tar.gz
vyos-1x-506b25f407b5b65018d1534e871e6f224804eecb.zip
nhrp: T2326: Fixed network-id migration
Fixed network-id migration. Every tunnel should have its own nhrp network-id.
Diffstat (limited to 'src')
-rw-r--r--src/migration-scripts/nhrp/0-to-15
1 files changed, 3 insertions, 2 deletions
diff --git a/src/migration-scripts/nhrp/0-to-1 b/src/migration-scripts/nhrp/0-to-1
index 249010def..badd88e04 100644
--- a/src/migration-scripts/nhrp/0-to-1
+++ b/src/migration-scripts/nhrp/0-to-1
@@ -24,7 +24,7 @@ interface_base = ['interfaces', 'tunnel']
def migrate(config: ConfigTree) -> None:
if not config.exists(base):
return
-
+ networkid = 1
for tunnel_name in config.list_nodes(base):
## Cisco Authentication migration
if config.exists(base + [tunnel_name,'cisco-authentication']):
@@ -40,7 +40,8 @@ def migrate(config: ConfigTree) -> None:
config.delete(base + [tunnel_name,'holding-time'])
config.set(base + [tunnel_name,'holdtime'], value=holdtime)
## Add network-id
- config.set(base + [tunnel_name, 'network-id'], value='1')
+ config.set(base + [tunnel_name, 'network-id'], value=networkid)
+ networkid+=1
## Map and nhs migration
nhs_tunnelip_list = []
nhs_nbmaip_list = []