diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-10-20 21:20:17 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-10-20 21:20:17 +0200 |
commit | 1312068cb9743dd4d16edd37dbed9c142724997e (patch) | |
tree | 10ac0636a1067ad76d929175f38ccc38c6a43494 /src/conf_mode | |
parent | 2ffd79535058f39e033871f187f3b69186aa6c0d (diff) | |
download | vyos-1x-1312068cb9743dd4d16edd37dbed9c142724997e.tar.gz vyos-1x-1312068cb9743dd4d16edd37dbed9c142724997e.zip |
tunnel: T3921: bugfix KeyError for source-address
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/interfaces-tunnel.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py index 5fa165190..4db564e6d 100755 --- a/src/conf_mode/interfaces-tunnel.py +++ b/src/conf_mode/interfaces-tunnel.py @@ -78,7 +78,7 @@ def verify(tunnel): # If tunnel source address any and key not set if tunnel['encapsulation'] in ['gre'] and \ - tunnel['source_address'] == '0.0.0.0' and \ + dict_search('source_address', tunnel) == '0.0.0.0' and \ dict_search('parameters.ip.key', tunnel) == None: raise ConfigError('Tunnel parameters ip key must be set!') @@ -91,7 +91,7 @@ def verify(tunnel): # no match on encapsulation - bail out if dict_search('linkinfo.info_kind', tunnel_cfg) != tunnel['encapsulation']: continue - new_source_address = tunnel['source_address'] + new_source_address = dict_search('source_address', tunnel) # Convert tunnel key to ip key, format "ip -j link show" # 1 => 0.0.0.1, 999 => 0.0.3.231 orig_new_key = dict_search('parameters.ip.key', tunnel) |