Skip to content

Commit

Permalink
Merge pull request #984 from sever-sever/T3786
Browse files Browse the repository at this point in the history
tunnel: T3786: Add checks for source any and not key
  • Loading branch information
c-po committed Aug 30, 2021
2 parents 7050223 + 5c29377 commit 9711774
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/conf_mode/interfaces-tunnel.py
Expand Up @@ -94,6 +94,12 @@ def verify(tunnel):
if 'direction' not in tunnel['parameters']['erspan']:
raise ConfigError('ERSPAN version 2 requires direction to be set!')

# 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)
Expand Down

0 comments on commit 9711774

Please sign in to comment.