summaryrefslogtreecommitdiff
path: root/src/helpers
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-07-09 15:53:53 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-07-09 15:53:53 +0000
commit7802af3157ed1c6eee4913bbfd75351b1cccc5c5 (patch)
tree47b53771edfff50490bb40b9eb7c74f5c45abc09 /src/helpers
parent63256e1b57153762d1d5028fc0bbb8f373ce1433 (diff)
downloadvyos-1x-7802af3157ed1c6eee4913bbfd75351b1cccc5c5.tar.gz
vyos-1x-7802af3157ed1c6eee4913bbfd75351b1cccc5c5.zip
T775: Config-sync bracketize IPv6 secondary address
bracketize IPv6 remote address to avoid Failed to parse: https://2001:db8::2/configure-section
Diffstat (limited to 'src/helpers')
-rwxr-xr-xsrc/helpers/vyos_config_sync.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helpers/vyos_config_sync.py b/src/helpers/vyos_config_sync.py
index 6e66a6be0..7cfa8fe88 100755
--- a/src/helpers/vyos_config_sync.py
+++ b/src/helpers/vyos_config_sync.py
@@ -24,6 +24,7 @@ import logging
from typing import Optional, List, Union, Dict, Any
from vyos.config import Config
+from vyos.template import bracketize_ipv6
CONFIG_FILE = '/run/config_sync_conf.conf'
@@ -175,6 +176,7 @@ if __name__ == '__main__':
mode = config.get('mode')
secondary_address = config.get('secondary', {}).get('address')
+ secondary_address = bracketize_ipv6(secondary_address)
secondary_key = config.get('secondary', {}).get('key')
sections = config.get('section')
timeout = int(config.get('secondary', {}).get('timeout'))