summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interface-definitions/interfaces_vxlan.xml.in1
-rwxr-xr-xsrc/conf_mode/interfaces_vxlan.py3
2 files changed, 3 insertions, 1 deletions
diff --git a/interface-definitions/interfaces_vxlan.xml.in b/interface-definitions/interfaces_vxlan.xml.in
index f4cd4fcd2..0698d20b9 100644
--- a/interface-definitions/interfaces_vxlan.xml.in
+++ b/interface-definitions/interfaces_vxlan.xml.in
@@ -128,6 +128,7 @@
<constraintErrorMessage>Not a valid VLAN ID or range, VLAN ID must be between 0 and 4094</constraintErrorMessage>
</properties>
<children>
+ #include <include/generic-description.xml.i>
<leafNode name="vni">
<properties>
<help>Virtual Network Identifier</help>
diff --git a/src/conf_mode/interfaces_vxlan.py b/src/conf_mode/interfaces_vxlan.py
index 34eb3ef5c..81ebf8dda 100755
--- a/src/conf_mode/interfaces_vxlan.py
+++ b/src/conf_mode/interfaces_vxlan.py
@@ -66,7 +66,8 @@ def get_config(config=None):
vxlan.update({'vlan_to_vni_removed': {}})
for vlan in tmp:
vni = leaf_node_changed(conf, base + [ifname, 'vlan-to-vni', vlan, 'vni'])
- vxlan['vlan_to_vni_removed'].update({vlan : {'vni' : vni[0]}})
+ if vni:
+ vxlan['vlan_to_vni_removed'].update({vlan : {'vni' : vni[0]}})
# We need to verify that no other VXLAN tunnel is configured when external
# mode is in use - Linux Kernel limitation