]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: VXLAN add support to configure Generic Protocol Extension
authorSusant Sahani <ssahani@redhat.com>
Mon, 6 May 2019 19:10:57 +0000 (00:40 +0530)
committerSusant Sahani <ssahani@redhat.com>
Wed, 8 May 2019 01:22:42 +0000 (06:52 +0530)
See https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-07

man/systemd.netdev.xml
src/network/netdev/netdev-gperf.gperf
src/network/netdev/vxlan.c
src/network/netdev/vxlan.h
test/fuzz/fuzz-netdev-parser/directives.netdev

index 1f2f4bd9c88ef53b735b61886ca5c5a5fd8281d7..7fddedf6e8ff7aebe851d3d1690b5c9e4c320ef9 100644 (file)
         VXLAN Group Policy </ulink> document. Defaults to false.</para>
       </listitem>
     </varlistentry>
+    <varlistentry>
+       <term><varname>GenericProtocolExtension=</varname></term>
+       <listitem>
+         <para>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 <ulink url="https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-07">
+         Generic Protocol Extension for VXLAN </ulink> document. Defaults to false.</para>
+       </listitem>
+    </varlistentry>
     <varlistentry>
       <term><varname>DestinationPort=</varname></term>
       <listitem>
index e71c9d00daa8b40890cb93e788931cecfff3dd2b..10bd334d4bf70062e3280997d3dc89e8b8efbcfb 100644 (file)
@@ -119,6 +119,7 @@ VXLAN.RemoteChecksumTx,                   config_parse_bool,
 VXLAN.RemoteChecksumRx,                   config_parse_bool,                         0,                             offsetof(VxLan, remote_csum_rx)
 VXLAN.FDBAgeingSec,                       config_parse_sec,                          0,                             offsetof(VxLan, fdb_ageing)
 VXLAN.GroupPolicyExtension,               config_parse_bool,                         0,                             offsetof(VxLan, group_policy)
+VXLAN.GenericProtocolExtension,           config_parse_bool,                         0,                             offsetof(VxLan, generic_protocol_extension)
 VXLAN.MaximumFDBEntries,                  config_parse_unsigned,                     0,                             offsetof(VxLan, max_fdb)
 VXLAN.PortRange,                          config_parse_port_range,                   0,                             0
 VXLAN.DestinationPort,                    config_parse_ip_port,                      0,                             offsetof(VxLan, dest_port)
index 8fa6e87d92323801b535b72c1adfe3a5a2a52be5..86403696a01ed1e64511ec291a662397b927f02c 100644 (file)
@@ -144,6 +144,12 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
                         return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_GBP attribute: %m");
         }
 
+        if (v->generic_protocol_extension) {
+                r = sd_netlink_message_append_flag(m, IFLA_VXLAN_GPE);
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_GPE attribute: %m");
+        }
+
         return r;
 }
 
index 03716f6f8958e71280615714c515bfe6949625b9..c2dbfaf20293399cef9a0e1ba698aa241dc66030 100644 (file)
@@ -42,6 +42,7 @@ struct VxLan {
         bool remote_csum_tx;
         bool remote_csum_rx;
         bool group_policy;
+        bool generic_protocol_extension;
 
         struct ifla_vxlan_port_range port_range;
 };
index 0d0bd2c85b208ec626bcb5b6b1dc60c58efdb396..5aa5e9283d358513c288d6f2f5e98492bc2ce7c9 100644 (file)
@@ -101,6 +101,7 @@ UDP6ZeroChecksumTx=
 UDP6ZeroCheckSumRx=
 UDPCheckSum=
 GroupPolicyExtension=
+GenericProtocolExtension=
 MaximumFDBEntries=
 TTL=
 DestinationPort=