summaryrefslogtreecommitdiffstats
path: root/src/network/netdev/vxlan.h
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2019-05-08 19:01:08 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-05-09 06:40:33 +0200
commit1189c00a3c41e0982fb598909911f5a58c278adc (patch)
tree1dcc06a9efd69fc69129891fc8c48f35ee56be75 /src/network/netdev/vxlan.h
parentsd-netlink: Add VXLAN netlink properties (diff)
downloadsystemd-1189c00a3c41e0982fb598909911f5a58c278adc.tar.xz
systemd-1189c00a3c41e0982fb598909911f5a58c278adc.zip
networkd: VXLAN add support to configure IP Don't fragment.
Allow users to set the IPv4 DF bit in outgoing packets, or to inherit its value from the IPv4 inner header. If the encapsulated protocol is IPv6 and DF is configured to be inherited, always set it.
Diffstat (limited to 'src/network/netdev/vxlan.h')
-rw-r--r--src/network/netdev/vxlan.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/network/netdev/vxlan.h b/src/network/netdev/vxlan.h
index ad72a10b2f..d448e3ccfe 100644
--- a/src/network/netdev/vxlan.h
+++ b/src/network/netdev/vxlan.h
@@ -3,12 +3,22 @@
typedef struct VxLan VxLan;
+#include <linux/if_link.h>
+
#include "in-addr-util.h"
#include "netdev/netdev.h"
#define VXLAN_VID_MAX (1u << 24) - 1
#define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
+typedef enum VxLanDF {
+ NETDEV_VXLAN_DF_NO = VXLAN_DF_UNSET,
+ NETDEV_VXLAN_DF_YES = VXLAN_DF_SET,
+ NETDEV_VXLAN_DF_INHERIT = VXLAN_DF_INHERIT,
+ _NETDEV_VXLAN_DF_MAX,
+ _NETDEV_VXLAN_DF_INVALID = -1
+} VxLanDF;
+
struct VxLan {
NetDev meta;
@@ -18,6 +28,8 @@ struct VxLan {
int local_family;
int group_family;
+ VxLanDF df;
+
union in_addr_union remote;
union in_addr_union local;
union in_addr_union group;
@@ -50,6 +62,10 @@ struct VxLan {
DEFINE_NETDEV_CAST(VXLAN, VxLan);
extern const NetDevVTable vxlan_vtable;
+const char *df_to_string(VxLanDF d) _const_;
+VxLanDF df_from_string(const char *d) _pure_;
+
CONFIG_PARSER_PROTOTYPE(config_parse_vxlan_address);
CONFIG_PARSER_PROTOTYPE(config_parse_port_range);
CONFIG_PARSER_PROTOTYPE(config_parse_flow_label);
+CONFIG_PARSER_PROTOTYPE(config_parse_df);