Skip to content

Commit

Permalink
vxlan: T5429: source-interface is not honored and throws config error
Browse files Browse the repository at this point in the history
cpo@leaf-02# show interfaces vxlan
+vxlan vxlan1 {
+    mtu 1500
+    parameters {
+        nolearning
+    }
+    port 4789
+    source-interface dum1
+    vni 100
+}

cpo@leaf-02# commit
[ interfaces vxlan vxlan1 ]
Group, remote or source-address must be configured

[[interfaces vxlan vxlan1]] failed

Extend verify() check to also honor source-interface definition.
  • Loading branch information
c-po committed Aug 2, 2023
1 parent 1dba4d0 commit 8f161ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/conf_mode/interfaces-vxlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def verify(vxlan):
raise ConfigError('Multicast VXLAN requires an underlaying interface')
verify_source_interface(vxlan)

if not any(tmp in ['group', 'remote', 'source_address'] for tmp in vxlan):
raise ConfigError('Group, remote or source-address must be configured')
if not any(tmp in ['group', 'remote', 'source_address', 'source_interface'] for tmp in vxlan):
raise ConfigError('Group, remote, source-address or source-interface must be configured')

if 'vni' not in vxlan and 'external' not in vxlan:
raise ConfigError(
Expand Down

0 comments on commit 8f161ea

Please sign in to comment.