diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-06-20 12:39:42 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-07-11 14:45:41 +0200 |
commit | 701613fc6ec802ef5eca9656ef0ff981c673da36 (patch) | |
tree | d0a480e1da2571630b3bd2d326976347e9a643a0 /smoketest/scripts/cli/test_vrf.py | |
parent | cc5fdd0bbc9553fffdd3296b4b427c8b5c4f31f0 (diff) | |
download | vyos-1x-701613fc6ec802ef5eca9656ef0ff981c673da36.tar.gz vyos-1x-701613fc6ec802ef5eca9656ef0ff981c673da36.zip |
smoketest: T3637: add testcase for vrf bind-to-all option
(cherry picked from commit 63a094b339296d97ecf3b87eac8d1d3ce8fadd3a)
Diffstat (limited to 'smoketest/scripts/cli/test_vrf.py')
-rwxr-xr-x | smoketest/scripts/cli/test_vrf.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_vrf.py b/smoketest/scripts/cli/test_vrf.py index 856baa070..4ce470d46 100755 --- a/smoketest/scripts/cli/test_vrf.py +++ b/smoketest/scripts/cli/test_vrf.py @@ -125,6 +125,24 @@ class VRFTest(unittest.TestCase): self.assertTrue(is_intf_addr_assigned(vrf, '127.0.0.1')) self.assertTrue(is_intf_addr_assigned(vrf, '::1')) + def test_vrf_bind_all(self): + table = '2000' + for vrf in vrfs: + base = base_path + ['name', vrf] + self.session.set(base + ['table', str(table)]) + table = str(int(table) + 1) + + self.session.set(base_path + ['bind-to-all']) + + # commit changes + self.session.commit() + + # Verify VRF configuration + tmp = read_file('/proc/sys/net/ipv4/tcp_l3mdev_accept') + self.assertIn(tmp, '1') + tmp = read_file('/proc/sys/net/ipv4/udp_l3mdev_accept') + self.assertIn(tmp, '1') + def test_vrf_table_id_is_unalterable(self): # Linux Kernel prohibits the change of a VRF table on the fly. # VRF must be deleted and recreated! |