networkd: vxlan support setting IPv6 flow labe

This work adds support for setting the IPv6 flow label for vxlan.

vxlan.netdev

NetDev]
Description=vxlan-test
Name=vxlan1
Kind=vxlan

[VXLAN]
Id=33
Local=2405:204:920b:29ac:7e7a:91ff:fe6d:ffe2
Remote=FF02:0:0:0:0:0:1:9
FlowLabel=104
ip -d link show vxlan1

8: vxlan1: <BROADCAST,MULTICAST> mtu 1430 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether be:83:aa:db:6b:cb brd ff:ff:ff:ff:ff:ff promiscuity 0
    vxlan id 33 group ff02::1:9 local 2405:204:920b:29ac:7e7a:91ff:fe6d:ffe2 dev enp0s25 srcport 0 0 dstport 8472 flowlabel 0x68 ageing 300 noudpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode eui64 numtxqueues 1 numrxqueues 1
This commit is contained in:
Susant Sahani
2017-03-14 10:11:49 +05:30
parent 6d21646af8
commit d8653945f7
4 changed files with 62 additions and 0 deletions
+13
View File
@@ -25,6 +25,7 @@ typedef struct VxLan VxLan;
#include "netdev/netdev.h"
#define VXLAN_VID_MAX (1u << 24) - 1
#define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
struct VxLan {
NetDev meta;
@@ -40,6 +41,7 @@ struct VxLan {
unsigned tos;
unsigned ttl;
unsigned max_fdb;
unsigned flow_label;
uint16_t dest_port;
@@ -94,3 +96,14 @@ int config_parse_destination_port(const char *unit,
const char *rvalue,
void *data,
void *userdata);
int config_parse_flow_label(const char *unit,
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata);