diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-15 17:25:40 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-15 17:26:43 +0100 |
commit | 8d41bc6f721979780e03a0d0d22c53c0e41b54ad (patch) | |
tree | b7aa18965bafd4320c04f773385778f1cb3d4589 /smoketest | |
parent | d969fd1f4dc0f4f7a0c935272857595e29ff0032 (diff) | |
download | vyos-1x-8d41bc6f721979780e03a0d0d22c53c0e41b54ad.tar.gz vyos-1x-8d41bc6f721979780e03a0d0d22c53c0e41b54ad.zip |
smoketest: bfd: ensure sessions are sourced from a valid local if
.. if BFD connections will be source from invalid sources this will
crash bfdd in FRR 7.3
(cherry picked from commit 82bdae42ceefb1132f8a98628fa9681543f4f269)
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_protocols_bfd.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bfd.py b/smoketest/scripts/cli/test_protocols_bfd.py index 044b4b92e..996a54a9d 100755 --- a/smoketest/scripts/cli/test_protocols_bfd.py +++ b/smoketest/scripts/cli/test_protocols_bfd.py @@ -25,28 +25,29 @@ from vyos.util import process_named_running PROCESS_NAME = 'bfdd' base_path = ['protocols', 'bfd'] +dum_if = 'dum1001' neighbor_config = { - '192.0.2.1' : { + '192.0.2.10' : { 'intv_rx' : '500', 'intv_tx' : '600', 'multihop' : '', 'source_addr': '192.0.2.254', }, - '192.0.2.2' : { + '192.0.2.20' : { 'echo_mode' : '', 'intv_echo' : '100', 'intv_mult' : '111', 'intv_rx' : '222', 'intv_tx' : '333', 'shutdown' : '', - 'source_intf': 'lo', + 'source_intf': dum_if, }, - '2001:db8::1' : { - 'source_addr': 'fe80::1', - 'source_intf': 'eth0', + '2001:db8::a' : { + 'source_addr': '2001:db8::1', + 'source_intf': dum_if, }, - '2001:db8::2' : { - 'source_addr': 'fe80::1', + '2001:db8::b' : { + 'source_addr': '2001:db8::1', 'multihop' : '', }, } @@ -60,8 +61,11 @@ def getBFDPeerconfig(peer): class TestProtocolsBFD(unittest.TestCase): def setUp(self): self.session = ConfigSession(os.getpid()) + self.session.set(['interfaces', 'dummy', dum_if, 'address', '192.0.2.1/24']) + self.session.set(['interfaces', 'dummy', dum_if, 'address', '2001:db8::1/64']) def tearDown(self): + self.session.delete(['interfaces', 'dummy', dum_if]) self.session.delete(base_path) self.session.commit() del self.session |