summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-19 10:30:03 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-19 10:30:03 +0100
commit0f04c1cd73fa40eee3761393db5183b2d9108309 (patch)
tree99f36e885a749cd82a8ff1733a3d606c7334d0a4
parent4957ef1bd8f1f0bf0b4828e7fadb64d1bac0bd2d (diff)
downloadvyos-1x-0f04c1cd73fa40eee3761393db5183b2d9108309.tar.gz
vyos-1x-0f04c1cd73fa40eee3761393db5183b2d9108309.zip
vxlan: T3700: add support for Generic Protocol extension (VXLAN-GPE)
-rw-r--r--interface-definitions/interfaces-vxlan.xml.in6
-rw-r--r--python/vyos/ifconfig/vxlan.py1
-rwxr-xr-xsrc/conf_mode/interfaces-vxlan.py4
3 files changed, 11 insertions, 0 deletions
diff --git a/interface-definitions/interfaces-vxlan.xml.in b/interface-definitions/interfaces-vxlan.xml.in
index caeb58116..6c53f8c44 100644
--- a/interface-definitions/interfaces-vxlan.xml.in
+++ b/interface-definitions/interfaces-vxlan.xml.in
@@ -25,6 +25,12 @@
<valueless/>
</properties>
</leafNode>
+ <leafNode name="gpe">
+ <properties>
+ <help>Enable Generic Protocol extension (VXLAN-GPE)</help>
+ <valueless/>
+ </properties>
+ </leafNode>
<leafNode name="group">
<properties>
<help>Multicast group address for VXLAN interface</help>
diff --git a/python/vyos/ifconfig/vxlan.py b/python/vyos/ifconfig/vxlan.py
index 9615f396d..0c5282db4 100644
--- a/python/vyos/ifconfig/vxlan.py
+++ b/python/vyos/ifconfig/vxlan.py
@@ -56,6 +56,7 @@ class VXLANIf(Interface):
mapping = {
'group' : 'group',
'external' : 'external',
+ 'gpe' : 'gpe',
'parameters.ip.dont_fragment': 'df set',
'parameters.ip.tos' : 'tos',
'parameters.ip.ttl' : 'ttl',
diff --git a/src/conf_mode/interfaces-vxlan.py b/src/conf_mode/interfaces-vxlan.py
index 6cd931049..1f097c4e3 100755
--- a/src/conf_mode/interfaces-vxlan.py
+++ b/src/conf_mode/interfaces-vxlan.py
@@ -89,6 +89,10 @@ def verify(vxlan):
raise ConfigError(f'Only one VXLAN tunnel is supported when "external" '\
f'CLI option is used. Additional tunnels: {other_tunnels}')
+ if 'gpe' in vxlan and 'external' not in vxlan:
+ raise ConfigError(f'VXLAN-GPE is only supported when "external" '\
+ f'CLI option is used.')
+
if 'source_interface' in vxlan:
# VXLAN adds at least an overhead of 50 byte - we need to check the
# underlaying device if our VXLAN package is not going to be fragmented!