networkd: add support for vxlan Remote and Local.
This patch add supports to configure IFLA_VXLAN_LOCAL
and IFLA_VXLAN_GROUP.
The "Group" is renamed to "Remote" which is a multicast address.`
```
Description=vxlan-test
Name=vxlan1
Kind=vxlan
[VXLAN]
Id=33
Local=2001:db8:2f4:4bff:fa71:1a56
Remote=FF02:0:0:0:0:0:1:9
```
output
```
ip -d link show vxlan1
16: vxlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1430 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/ether fe:b4:97:03:f8:e5 brd ff:ff:ff:ff:ff:ff promiscuity 0
vxlan id 33 group ff02::1:9 local 2001:db8:02f4:4bff:fa71:1a56 dev enp0s3 srcport 0 0 dstport 8472 ageing 300 noudpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
```
This commit is contained in:
+15
-12
@@ -31,8 +31,11 @@ struct VxLan {
|
||||
|
||||
uint64_t id;
|
||||
|
||||
int family;
|
||||
union in_addr_union group;
|
||||
int remote_family;
|
||||
int local_family;
|
||||
|
||||
union in_addr_union remote;
|
||||
union in_addr_union local;
|
||||
|
||||
unsigned tos;
|
||||
unsigned ttl;
|
||||
@@ -60,16 +63,16 @@ struct VxLan {
|
||||
DEFINE_NETDEV_CAST(VXLAN, VxLan);
|
||||
extern const NetDevVTable vxlan_vtable;
|
||||
|
||||
int config_parse_vxlan_group_address(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);
|
||||
int config_parse_vxlan_address(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);
|
||||
int config_parse_port_range(const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
|
||||
Reference in New Issue
Block a user