summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interface-definitions/include/interface/parameters-df.xml.i26
-rw-r--r--interface-definitions/include/interface/parameters-dont-fragment.xml.i8
-rw-r--r--interface-definitions/interfaces-geneve.xml.in2
-rw-r--r--interface-definitions/interfaces-vxlan.xml.in2
-rw-r--r--python/vyos/ifconfig/geneve.py2
-rw-r--r--python/vyos/ifconfig/vxlan.py2
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_geneve.py4
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_vxlan.py2
-rwxr-xr-xsrc/conf_mode/interfaces-vxlan.py10
9 files changed, 39 insertions, 19 deletions
diff --git a/interface-definitions/include/interface/parameters-df.xml.i b/interface-definitions/include/interface/parameters-df.xml.i
new file mode 100644
index 000000000..82436b5e4
--- /dev/null
+++ b/interface-definitions/include/interface/parameters-df.xml.i
@@ -0,0 +1,26 @@
+<!-- include start from interface/parameters-df.xml.i -->
+<leafNode name="df">
+ <properties>
+ <help>Usage of the DF (don't Fragment) bit in outgoing packets</help>
+ <completionHelp>
+ <list>set unset inherit</list>
+ </completionHelp>
+ <valueHelp>
+ <format>set</format>
+ <description>Always set DF (don't fragment) bit</description>
+ </valueHelp>
+ <valueHelp>
+ <format>unset</format>
+ <description>Always unset DF (don't fragment) bit</description>
+ </valueHelp>
+ <valueHelp>
+ <format>inherit</format>
+ <description>Copy from the original IP header</description>
+ </valueHelp>
+ <constraint>
+ <regex>(set|unset|inherit)</regex>
+ </constraint>
+ </properties>
+ <defaultValue>unset</defaultValue>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/interface/parameters-dont-fragment.xml.i b/interface-definitions/include/interface/parameters-dont-fragment.xml.i
deleted file mode 100644
index 6165184f8..000000000
--- a/interface-definitions/include/interface/parameters-dont-fragment.xml.i
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- include start from interface/parameters-dont-fragment.xml.i -->
-<leafNode name="dont-fragment">
- <properties>
- <help>Always set the DF (don't fragment) bit</help>
- <valueless/>
- </properties>
-</leafNode>
-<!-- include end -->
diff --git a/interface-definitions/interfaces-geneve.xml.in b/interface-definitions/interfaces-geneve.xml.in
index fa5a78be5..9143ba6be 100644
--- a/interface-definitions/interfaces-geneve.xml.in
+++ b/interface-definitions/interfaces-geneve.xml.in
@@ -35,7 +35,7 @@
<help>IPv4 specific tunnel parameters</help>
</properties>
<children>
- #include <include/interface/parameters-dont-fragment.xml.i>
+ #include <include/interface/parameters-df.xml.i>
#include <include/interface/parameters-tos.xml.i>
#include <include/interface/parameters-ttl.xml.i>
</children>
diff --git a/interface-definitions/interfaces-vxlan.xml.in b/interface-definitions/interfaces-vxlan.xml.in
index 9747b1816..8b50fe1b7 100644
--- a/interface-definitions/interfaces-vxlan.xml.in
+++ b/interface-definitions/interfaces-vxlan.xml.in
@@ -69,7 +69,7 @@
<help>IPv4 specific tunnel parameters</help>
</properties>
<children>
- #include <include/interface/parameters-dont-fragment.xml.i>
+ #include <include/interface/parameters-df.xml.i>
#include <include/interface/parameters-tos.xml.i>
#include <include/interface/parameters-ttl.xml.i>
<leafNode name="ttl">
diff --git a/python/vyos/ifconfig/geneve.py b/python/vyos/ifconfig/geneve.py
index 7cb3968df..276c34cd7 100644
--- a/python/vyos/ifconfig/geneve.py
+++ b/python/vyos/ifconfig/geneve.py
@@ -42,7 +42,7 @@ class GeneveIf(Interface):
# arguments used by iproute2. For more information please refer to:
# - https://man7.org/linux/man-pages/man8/ip-link.8.html
mapping = {
- 'parameters.ip.dont_fragment': 'df set',
+ 'parameters.ip.df' : 'df',
'parameters.ip.tos' : 'tos',
'parameters.ip.ttl' : 'ttl',
'parameters.ipv6.flowlabel' : 'flowlabel',
diff --git a/python/vyos/ifconfig/vxlan.py b/python/vyos/ifconfig/vxlan.py
index 516a19f24..5baff10a9 100644
--- a/python/vyos/ifconfig/vxlan.py
+++ b/python/vyos/ifconfig/vxlan.py
@@ -57,7 +57,7 @@ class VXLANIf(Interface):
'group' : 'group',
'external' : 'external',
'gpe' : 'gpe',
- 'parameters.ip.dont_fragment': 'df set',
+ 'parameters.ip.df' : 'df',
'parameters.ip.tos' : 'tos',
'parameters.ip.ttl' : 'ttl',
'parameters.ipv6.flowlabel' : 'flowlabel',
diff --git a/smoketest/scripts/cli/test_interfaces_geneve.py b/smoketest/scripts/cli/test_interfaces_geneve.py
index 6233ade6e..430085e7f 100755
--- a/smoketest/scripts/cli/test_interfaces_geneve.py
+++ b/smoketest/scripts/cli/test_interfaces_geneve.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2020-2021 VyOS maintainers and contributors
+# Copyright (C) 2020-2022 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -43,7 +43,7 @@ class GeneveInterfaceTest(BasicInterfaceTest.TestCase):
for option in self._options.get(intf, []):
self.cli_set(self._base_path + [intf] + option.split())
- self.cli_set(self._base_path + [intf, 'parameters', 'ip', 'dont-fragment'])
+ self.cli_set(self._base_path + [intf, 'parameters', 'ip', 'df', 'set'])
self.cli_set(self._base_path + [intf, 'parameters', 'ip', 'tos', tos])
self.cli_set(self._base_path + [intf, 'parameters', 'ip', 'ttl', str(ttl)])
ttl += 10
diff --git a/smoketest/scripts/cli/test_interfaces_vxlan.py b/smoketest/scripts/cli/test_interfaces_vxlan.py
index f34b99ea4..bb85f1936 100755
--- a/smoketest/scripts/cli/test_interfaces_vxlan.py
+++ b/smoketest/scripts/cli/test_interfaces_vxlan.py
@@ -48,7 +48,7 @@ class VXLANInterfaceTest(BasicInterfaceTest.TestCase):
for option in self._options.get(intf, []):
self.cli_set(self._base_path + [intf] + option.split())
- self.cli_set(self._base_path + [intf, 'parameters', 'ip', 'dont-fragment'])
+ self.cli_set(self._base_path + [intf, 'parameters', 'ip', 'df', 'set'])
self.cli_set(self._base_path + [intf, 'parameters', 'ip', 'tos', tos])
self.cli_set(self._base_path + [intf, 'parameters', 'ip', 'ttl', str(ttl)])
ttl += 10
diff --git a/src/conf_mode/interfaces-vxlan.py b/src/conf_mode/interfaces-vxlan.py
index 848112c17..53704827e 100755
--- a/src/conf_mode/interfaces-vxlan.py
+++ b/src/conf_mode/interfaces-vxlan.py
@@ -23,6 +23,7 @@ from vyos.base import Warning
from vyos.config import Config
from vyos.configdict import get_interface_dict
from vyos.configdict import leaf_node_changed
+from vyos.configdict import node_changed
from vyos.configverify import verify_address
from vyos.configverify import verify_bridge_delete
from vyos.configverify import verify_mtu_ipv6
@@ -51,12 +52,13 @@ def get_config(config=None):
# change. But a VXLAN interface should - of course - not be re-created if
# it's description or IP address is adjusted. Feels somehow logic doesn't it?
for cli_option in ['external', 'gpe', 'group', 'port', 'remote',
- 'source-address', 'source-interface', 'vni',
- 'parameters ip dont-fragment', 'parameters ip tos',
- 'parameters ip ttl']:
- if leaf_node_changed(conf, cli_option.split()):
+ 'source-address', 'source-interface', 'vni']:
+ if leaf_node_changed(conf, cli_option):
vxlan.update({'rebuild_required': {}})
+ if node_changed(conf, ['parameters'], recursive=True):
+ vxlan.update({'rebuild_required': {}})
+
# We need to verify that no other VXLAN tunnel is configured when external
# mode is in use - Linux Kernel limitation
conf.set_level(base)