From: Susant Sahani Date: Wed, 8 May 2019 14:39:42 +0000 (+0530) Subject: networkd: Assign VXLAN destination port to when GPE is set X-Git-Tag: v243-rc1~464^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c8b0eccc788e94a9ff1987948e9af35efc246cd;p=thirdparty%2Fsystemd.git networkd: Assign VXLAN destination port to when GPE is set When VXLAN destination port is unset and GPE is set then assign 4790 to destination port. Kernel does the same as well as iproute. IANA VXLAN-GPE port is 4790 --- diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml index 7fddedf6e8f..fc33f89a388 100644 --- a/man/systemd.netdev.xml +++ b/man/systemd.netdev.xml @@ -661,7 +661,8 @@ Takes a boolean. When true, Generic Protocol Extension extends the existing VXLAN protocol to provide protocol typing, OAM, and versioning capabilities. For details about the VXLAN GPE Header, see the - Generic Protocol Extension for VXLAN document. Defaults to false. + Generic Protocol Extension for VXLAN document. If destination port is not specified and + Generic Protocol Extension is set then default port of 4790 is used. Defaults to false. diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c index 86403696a01..56c97cb6865 100644 --- a/src/network/netdev/vxlan.c +++ b/src/network/netdev/vxlan.c @@ -289,6 +289,9 @@ static int netdev_vxlan_verify(NetDev *netdev, const char *filename) { "%s: VXLAN TTL must be <= 255. Ignoring.", filename); + if (!v->dest_port && v->generic_protocol_extension) + v->dest_port = 4790; + return 0; }