summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-03-07 20:39:48 +0100
committerChristian Poessinger <christian@poessinger.com>2021-03-07 20:39:48 +0100
commit74ca56b72f6bd8b794dd4503cf682db6c9ba0635 (patch)
tree175d4111452e706afa01bb174bb8c3b0728e715f /python
parenta7301da66ab4b52c2a1c1a562d75b0def63ff93a (diff)
downloadvyos-1x-74ca56b72f6bd8b794dd4503cf682db6c9ba0635.tar.gz
vyos-1x-74ca56b72f6bd8b794dd4503cf682db6c9ba0635.zip
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
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/vxlan.py10
1 files 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')