diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-06 19:59:33 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-06 20:01:38 +0100 |
commit | ef2242e8e5c278c201ad825f4037668c86934443 (patch) | |
tree | e997b15eb4e0962029c7d1aafc64f4e34d92755a /src/conf_mode/protocols_bfd.py | |
parent | 84455522574afb9286803f4e192a3d99c259618c (diff) | |
download | vyos-1x-ef2242e8e5c278c201ad825f4037668c86934443.tar.gz vyos-1x-ef2242e8e5c278c201ad825f4037668c86934443.zip |
bfd: T4054: bugfix missing profile assignment to peer
Diffstat (limited to 'src/conf_mode/protocols_bfd.py')
-rwxr-xr-x | src/conf_mode/protocols_bfd.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bfd.py b/src/conf_mode/protocols_bfd.py index 6981d0db1..caef61b3f 100755 --- a/src/conf_mode/protocols_bfd.py +++ b/src/conf_mode/protocols_bfd.py @@ -84,6 +84,11 @@ def verify(bfd): if 'source' in peer_config and 'interface' in peer_config['source']: raise ConfigError('Multihop and source interface cannot be used together') + if 'profile' in peer_config: + profile_name = peer_config['profile'] + if 'profile' not in bfd or profile_name not in bfd['profile']: + raise ConfigError(f'BFD profile "{profile_name}" does not exist!') + if 'vrf' in peer_config: verify_vrf(peer_config) |