diff options
author | Viacheslav <v.gletenko@vyos.io> | 2021-08-30 15:43:02 +0000 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-08-30 22:36:18 +0200 |
commit | 11fdcb7cdd078e67b460b6863f8fd9785c33dc2d (patch) | |
tree | 619cb0981c450530f471624f7d1cb461822ad555 | |
parent | f5e46ee6cc2b6c1c1869e26beca4ccd5bf52b62f (diff) | |
download | vyos-1x-11fdcb7cdd078e67b460b6863f8fd9785c33dc2d.tar.gz vyos-1x-11fdcb7cdd078e67b460b6863f8fd9785c33dc2d.zip |
tunnel: T3786: Add checks for source any and not key
(cherry picked from commit 5c29377fa91595088118419275f6d05b1fbfbd1d)
-rwxr-xr-x | src/conf_mode/interfaces-tunnel.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py index e5958e9ae..a7207f94e 100755 --- a/src/conf_mode/interfaces-tunnel.py +++ b/src/conf_mode/interfaces-tunnel.py @@ -74,6 +74,12 @@ def verify(tunnel): verify_tunnel(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('parameters.ip.key', tunnel) == None: + raise ConfigError('Tunnel parameters ip key must be set!') + verify_mtu_ipv6(tunnel) verify_address(tunnel) verify_vrf(tunnel) |