diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-10-17 20:28:47 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-10-17 22:06:49 +0200 |
commit | b90041af38c1d872210d3720c258721247d313a5 (patch) | |
tree | c86c0fb198a3d560e6f6749cd803563f92165362 /smoketest/scripts | |
parent | b5ef10cfeb839dca28ae5376bfabafe29ae07aec (diff) | |
download | vyos-1x-b90041af38c1d872210d3720c258721247d313a5.tar.gz vyos-1x-b90041af38c1d872210d3720c258721247d313a5.zip |
smoketest: add IPv6 option tests to BasicInterfaceTest
Diffstat (limited to 'smoketest/scripts')
-rw-r--r-- | smoketest/scripts/cli/base_interfaces_test.py | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py index d94a5d962..c6bb5bd1a 100644 --- a/smoketest/scripts/cli/base_interfaces_test.py +++ b/smoketest/scripts/cli/base_interfaces_test.py @@ -228,7 +228,7 @@ class BasicInterfaceTest: self._mtu_test(vif) def test_ip_options(self): - """ test IP options like arp """ + """ Test interface base IPv4 options """ if not self._test_ip: return None @@ -278,3 +278,27 @@ class BasicInterfaceTest: tmp = read_file(f'/proc/sys/net/ipv4/conf/{interface}/rp_filter') self.assertEqual('2', tmp) + + def test_ipv6_options(self): + """ Test interface base IPv6 options """ + if not self._test_ipv6: + return None + + for interface in self._interfaces: + dad_transmits = '10' + path = self._base_path + [interface] + for option in self._options.get(interface, []): + self.session.set(path + option.split()) + + # Options + self.session.set(path + ['ipv6', 'disable-forwarding']) + self.session.set(path + ['ipv6', 'dup-addr-detect-transmits', dad_transmits]) + + self.session.commit() + + for interface in self._interfaces: + tmp = read_file(f'/proc/sys/net/ipv6/conf/{interface}/forwarding') + self.assertEqual('0', tmp) + + tmp = read_file(f'/proc/sys/net/ipv6/conf/{interface}/dad_transmits') + self.assertEqual(dad_transmits, tmp) |