From 74ca56b72f6bd8b794dd4503cf682db6c9ba0635 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 7 Mar 2021 20:39:48 +0100 Subject: vxlan: T3319: use default ttl of 16 VyOS 1.2 had a default ttl of 16 hardcoded to the node.def file [1], so until this is handled via a migration script we have to obey that particular setting. [1]: https://github.com/vyos/vyatta-cfg-system/blob/crux/templates/interfaces/vxlan/node.def#L23 --- python/vyos/ifconfig/vxlan.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python/vyos/ifconfig/vxlan.py b/python/vyos/ifconfig/vxlan.py index 202e9d81c..03c4d4dba 100644 --- a/python/vyos/ifconfig/vxlan.py +++ b/python/vyos/ifconfig/vxlan.py @@ -46,7 +46,8 @@ class VXLANIf(Interface): 'remote': '', 'source_address': '', 'source_interface': '', - 'vni': 0 + 'vni': 0, + 'ttl': '16', } definition = { **Interface.definition, @@ -56,8 +57,8 @@ class VXLANIf(Interface): 'bridgeable': True, } } - options = Interface.options + \ - ['group', 'remote', 'source_interface', 'port', 'vni', 'source_address'] + options = Interface.options + ['group', 'remote', 'source_interface', + 'port', 'vni', 'source_address', 'ttl'] mapping = { 'ifname': 'add', @@ -65,10 +66,11 @@ class VXLANIf(Interface): 'port': 'dstport', 'source_address': 'local', 'source_interface': 'dev', + 'ttl': 'ttl', } def _create(self): - cmdline = ['ifname', 'type', 'vni', 'port'] + cmdline = ['ifname', 'type', 'vni', 'port', 'ttl'] if self.config['source_address']: cmdline.append('source_address') -- cgit v1.2.3