Skip to content

Commit e9d9c09

Browse files
authored
Merge pull request #4364 from natali-rs1985/T7171
T7171: Add dstport option to GENEVE tunnels
2 parents fe08f7f + 0a7096c commit e9d9c09

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

interface-definitions/interfaces_geneve.xml.in

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
#include <include/interface/ipv6-options.xml.i>
2424
#include <include/interface/mac.xml.i>
2525
#include <include/interface/mtu-1200-16000.xml.i>
26+
#include <include/port-number.xml.i>
27+
<leafNode name="port">
28+
<defaultValue>6081</defaultValue>
29+
</leafNode>
2630
<node name="parameters">
2731
<properties>
2832
<help>GENEVE tunnel parameters</help>

python/vyos/ifconfig/geneve.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _create(self):
4848
'parameters.ipv6.flowlabel' : 'flowlabel',
4949
}
5050

51-
cmd = 'ip link add name {ifname} type geneve id {vni} remote {remote}'
51+
cmd = 'ip link add name {ifname} type geneve id {vni} remote {remote} dstport {port}'
5252
for vyos_key, iproute2_key in mapping.items():
5353
# dict_search will return an empty dict "{}" for valueless nodes like
5454
# "parameters.nolearning" - thus we need to test the nodes existence

src/conf_mode/interfaces_geneve.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_config(config=None):
4747
# GENEVE interfaces are picky and require recreation if certain parameters
4848
# change. But a GENEVE interface should - of course - not be re-created if
4949
# it's description or IP address is adjusted. Feels somehow logic doesn't it?
50-
for cli_option in ['remote', 'vni', 'parameters']:
50+
for cli_option in ['remote', 'vni', 'parameters', 'port']:
5151
if is_node_changed(conf, base + [ifname, cli_option]):
5252
geneve.update({'rebuild_required': {}})
5353

0 commit comments

Comments
 (0)