From 6492541b2ee3f7f246682d27974670bd6fbdacbe Mon Sep 17 00:00:00 2001 From: zsdc Date: Wed, 14 Aug 2019 22:03:42 +0300 Subject: [bfd] T1183: Added validations and fixing bugs in BFD: * added validations for "source address IP" and "bfd peer IP" * added check for configuring multihop together with an interface name * fixed "show protocols bfd peer X" for peers with custom options --- src/conf_mode/protocols_bfd.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/conf_mode/protocols_bfd.py') diff --git a/src/conf_mode/protocols_bfd.py b/src/conf_mode/protocols_bfd.py index 98f38035a..9ca194edd 100755 --- a/src/conf_mode/protocols_bfd.py +++ b/src/conf_mode/protocols_bfd.py @@ -176,6 +176,10 @@ def verify(bfd): if peer['multihop'] and peer['echo_mode']: raise ConfigError('Multihop and echo-mode cannot be used together') + # multihop doesn't accept interface names + if peer['multihop'] and peer['src_if']: + raise ConfigError('Multihop and source interface cannot be used together') + # echo interval can be configured only with enabled echo-mode if peer['echo_interval'] != '' and not peer['echo_mode']: raise ConfigError('echo-interval can be configured only with enabled echo-mode') -- cgit v1.2.3