diff options
author | sever-sever <v.gletenko@vyos.io> | 2021-06-01 11:30:11 +0000 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-06-04 14:48:01 +0200 |
commit | 5a029892e97a7a5ef4450237412eaa6ce29aeb39 (patch) | |
tree | 2d023cea1406ce59098c454ceea6712b3818775d /smoketest/scripts | |
parent | e0c86b974891dbea77bf77160b3188ace6d5a2f6 (diff) | |
download | vyos-1x-5a029892e97a7a5ef4450237412eaa6ce29aeb39.tar.gz vyos-1x-5a029892e97a7a5ef4450237412eaa6ce29aeb39.zip |
tunnels: T3592: Set default TTL to 64
Set default TTL value for tunnels from 0 to 64
There are a lot of situation when default value 0 (inherit)
not work properly when you have routing configuration for OSPF
or BGP over the tunnels. To fix it you need explicit set TTL
value other then 0. Or hardcode another value as default.
(cherry picked from commit b4db37507635bf95161bea32b18736fc0732a9e6)
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_tunnel.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_tunnel.py b/smoketest/scripts/cli/test_interfaces_tunnel.py index 0c562b7d9..bbdfc2f0e 100755 --- a/smoketest/scripts/cli/test_interfaces_tunnel.py +++ b/smoketest/scripts/cli/test_interfaces_tunnel.py @@ -174,6 +174,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): gre_key = '10' encapsulation = 'gre' tos = '20' + ttl = 0 self.session.set(self._base_path + [interface, 'encapsulation', encapsulation]) self.session.set(self._base_path + [interface, 'local-ip', self.local_v4]) @@ -181,6 +182,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): self.session.set(self._base_path + [interface, 'parameters', 'ip', 'key', gre_key]) self.session.set(self._base_path + [interface, 'parameters', 'ip', 'tos', tos]) + self.session.set(self._base_path + [interface, 'parameters', 'ip', 'ttl', str(ttl)]) # Check if commit is ok self.session.commit() @@ -191,7 +193,7 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): self.assertEqual(encapsulation, conf['linkinfo']['info_kind']) self.assertEqual(self.local_v4, conf['linkinfo']['info_data']['local']) self.assertEqual(remote_ip4, conf['linkinfo']['info_data']['remote']) - self.assertEqual(0, conf['linkinfo']['info_data']['ttl']) + self.assertEqual(ttl, conf['linkinfo']['info_data']['ttl']) def test_gretap_parameters_change(self): interface = f'tun1040' @@ -212,11 +214,13 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): self.assertEqual('gretap', conf['linkinfo']['info_kind']) self.assertEqual(self.local_v4, conf['linkinfo']['info_data']['local']) self.assertEqual(remote_ip4, conf['linkinfo']['info_data']['remote']) - self.assertEqual(0, conf['linkinfo']['info_data']['ttl']) + # TTL uses a default value + self.assertEqual(64, conf['linkinfo']['info_data']['ttl']) # Change remote ip address (inc host by 2 new_remote = inc_ip(remote_ip4, 2) self.session.set(self._base_path + [interface, 'remote-ip', new_remote]) + # Check if commit is ok self.session.commit() |