diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-02 21:46:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-02 21:46:09 +0200 |
commit | 6ad00236d7eae942c480825384fdd8a032944da8 (patch) | |
tree | a4b9d4d999002393b6319bb0e37815c7b6301c4e | |
parent | 658de9ea0fbe91e593f9cf0a8c434791282af100 (diff) | |
parent | 7e84566dedfdc532ffe05b404005daa6f21df567 (diff) | |
download | vyos-1x-6ad00236d7eae942c480825384fdd8a032944da8.tar.gz vyos-1x-6ad00236d7eae942c480825384fdd8a032944da8.zip |
Merge pull request #993 from sever-sever/T3788
tunnel: T3788: Add check keys for ipip and sit
-rwxr-xr-x | src/conf_mode/interfaces-tunnel.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py index bfd9a8c56..ef385d2e7 100755 --- a/src/conf_mode/interfaces-tunnel.py +++ b/src/conf_mode/interfaces-tunnel.py @@ -123,6 +123,11 @@ def verify(tunnel): raise ConfigError(f'Key "{orig_new_key}" for source-address "{new_source_address}" ' \ f'is already used for tunnel "{tunnel_if}"!') + # Keys are not allowed with ipip and sit tunnels + if tunnel['encapsulation'] in ['ipip', 'sit']: + if dict_search('parameters.ip.key', tunnel) != None: + raise ConfigError('Keys are not allowed with ipip and sit tunnels!') + verify_mtu_ipv6(tunnel) verify_address(tunnel) verify_vrf(tunnel) |