Skip to content

Commit

Permalink
nhrp: T2326: Fixed network-id migration
Browse files Browse the repository at this point in the history
Fixed network-id migration.
Every tunnel should have its own nhrp network-id.
  • Loading branch information
aapostoliuk committed Jan 17, 2025
1 parent 99d0c7a commit 506b25f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/migration-scripts/nhrp/0-to-1
Original file line number Diff line number Diff line change
Expand Up @@ -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']):
Expand All @@ -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 = []
Expand Down

0 comments on commit 506b25f

Please sign in to comment.