diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-12-19 19:29:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-19 19:29:48 +0100 |
commit | c4097097487467300a0a63c8a75f670dc0429f7c (patch) | |
tree | a4c755bda7d9afdb951b3027f83954c941ee403c | |
parent | a741a9297f02f938653aeaa1af3c4a57364e9215 (diff) | |
parent | 34edb6c19fd77af3ec621905e45631e4901ef574 (diff) | |
download | vyos-1x-c4097097487467300a0a63c8a75f670dc0429f7c.tar.gz vyos-1x-c4097097487467300a0a63c8a75f670dc0429f7c.zip |
Merge pull request #1719 from sever-sever/T4879
T4879: IPsec migration script remote-id for peer name eq address
-rwxr-xr-x | src/migration-scripts/ipsec/9-to-10 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/migration-scripts/ipsec/9-to-10 b/src/migration-scripts/ipsec/9-to-10 index 1254104cb..de366ef3b 100755 --- a/src/migration-scripts/ipsec/9-to-10 +++ b/src/migration-scripts/ipsec/9-to-10 @@ -85,10 +85,10 @@ if config.exists(base + ['site-to-site', 'peer']): config.rename(peer_base + ['authentication', 'id'], 'local-id') # For the peer '@foo' set remote-id 'foo' if remote-id is not defined - if peer.startswith('@'): - if not config.exists(peer_base + ['authentication', 'remote-id']): - tmp = peer.replace('@', '') - config.set(peer_base + ['authentication', 'remote-id'], value=tmp) + # For the peer '192.0.2.1' set remote-id '192.0.2.1' if remote-id is not defined + if not config.exists(peer_base + ['authentication', 'remote-id']): + tmp = peer.replace('@', '') if peer.startswith('@') else peer + config.set(peer_base + ['authentication', 'remote-id'], value=tmp) # replace: 'peer <tag> force-encapsulation enable' # => 'peer <tag> force-udp-encapsulation' |