From 41bb90c6e347749c685a3db8845e2c9a622a3ef9 Mon Sep 17 00:00:00 2001
From: Christian Breunig <christian@breunig.cc>
Date: Thu, 19 Oct 2023 19:25:39 +0200
Subject: vxlan: T5669: unable to change port number

set interfaces vxlan vxlan23 address '100.64.10.2/24'
set interfaces vxlan vxlan23 remote '192.0.2.1'
set interfaces vxlan vxlan23 source-address '192.0.2.5'
set interfaces vxlan vxlan23 vni '23'
commit

set interfaces vxlan vxlan23 port '4789'
commit

vyos@r1# ip -d link show dev vxlan23
12: vxlan23: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 22:6e:6d:33:c5:6b brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535
    vxlan id 23 remote 192.0.2.1 local 192.0.2.5 srcport 0 0 dstport 8472

Port remains at the default value of 8472

This has been fixed
---
 src/conf_mode/interfaces-vxlan.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf_mode/interfaces-vxlan.py b/src/conf_mode/interfaces-vxlan.py
index bdf47eba0..27e611c87 100755
--- a/src/conf_mode/interfaces-vxlan.py
+++ b/src/conf_mode/interfaces-vxlan.py
@@ -21,7 +21,7 @@ from netifaces import interfaces
 
 from vyos.config import Config
 from vyos.configdict import get_interface_dict
-from vyos.configdict import leaf_node_changed
+from vyos.configdict import is_node_changed
 from vyos.configverify import verify_address
 from vyos.configverify import verify_bridge_delete
 from vyos.configverify import verify_mtu_ipv6
@@ -53,7 +53,7 @@ def get_config(config=None):
                        'source-address', 'source-interface', 'vni',
                        'parameters ip dont-fragment', 'parameters ip tos',
                        'parameters ip ttl']:
-        if leaf_node_changed(conf, cli_option.split()):
+        if is_node_changed(conf, cli_option.split()):
             vxlan.update({'rebuild_required': {}})
 
     return vxlan
-- 
cgit v1.2.3