diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-10-21 19:38:38 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-10-21 19:46:05 +0200 |
commit | 103fca9f77c28e392146f791e0241e119feeadc9 (patch) | |
tree | 959fb82e019a72a35bf93a90d93a9e2e1c80adf9 /python/vyos | |
parent | 7bf418f5979b85d55d5634184b40b5d3a82966f9 (diff) | |
download | vyos-1x-103fca9f77c28e392146f791e0241e119feeadc9.tar.gz vyos-1x-103fca9f77c28e392146f791e0241e119feeadc9.zip |
tunnel: T3925: dhcp-interface was of no use - use source-interface instead
(cherry picked from commit c1015d8ce0013719eb898b60b14ffec192b8141c)
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/configverify.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index 8aca76568..365a28feb 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -110,15 +110,12 @@ def verify_tunnel(config): raise ConfigError('Must configure the tunnel encapsulation for '\ '{ifname}!'.format(**config)) - if 'source_address' not in config and 'dhcp_interface' not in config: - raise ConfigError('source-address is mandatory for tunnel') + if 'source_address' not in config and 'source_interface' not in config: + raise ConfigError('source-address or source-interface required for tunnel!') if 'remote' not in config and config['encapsulation'] != 'gre': raise ConfigError('remote ip address is mandatory for tunnel') - if {'source_address', 'dhcp_interface'} <= set(config): - raise ConfigError('Can not use both source-address and dhcp-interface') - if config['encapsulation'] in ['ipip6', 'ip6ip6', 'ip6gre', 'ip6gretap', 'ip6erspan']: error_ipv6 = 'Encapsulation mode requires IPv6' if 'source_address' in config and not is_ipv6(config['source_address']): |