From 83cb24ac20baf19f7834931dcf6e03486b4c9c30 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 7 May 2019 10:44:06 +0530 Subject: [PATCH] networkd: VXLan Make group and remote variable separate VXLAN Document Group= --- man/systemd.netdev.xml | 6 ++++++ src/network/netdev/netdev-gperf.gperf | 2 +- src/network/netdev/vxlan.c | 2 +- src/network/netdev/vxlan.h | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml index 3841ad54b72..1f2f4bd9c88 100644 --- a/man/systemd.netdev.xml +++ b/man/systemd.netdev.xml @@ -543,6 +543,12 @@ Configures local IP address. + + + Group= + + Configures VXLAN multicast group IP address. All members of a VXLAN must use the same multicast group address. + TOS= diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf index 163d7d01d2a..e71c9d00daa 100644 --- a/src/network/netdev/netdev-gperf.gperf +++ b/src/network/netdev/netdev-gperf.gperf @@ -98,7 +98,7 @@ Peer.MACAddress, config_parse_hwaddr, VXCAN.Peer, config_parse_ifname, 0, offsetof(VxCan, ifname_peer) VXLAN.VNI, config_parse_uint64, 0, offsetof(VxLan, vni) VXLAN.Id, config_parse_uint64, 0, offsetof(VxLan, vni) /* deprecated */ -VXLAN.Group, config_parse_vxlan_address, 0, offsetof(VxLan, remote) +VXLAN.Group, config_parse_vxlan_address, 0, offsetof(VxLan, group) VXLAN.Local, config_parse_vxlan_address, 0, offsetof(VxLan, local) VXLAN.Remote, config_parse_vxlan_address, 0, offsetof(VxLan, remote) VXLAN.TOS, config_parse_unsigned, 0, offsetof(VxLan, tos) diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c index c8d9cd46757..6c18debe3dc 100644 --- a/src/network/netdev/vxlan.c +++ b/src/network/netdev/vxlan.c @@ -180,7 +180,7 @@ int config_parse_vxlan_address(const char *unit, return 0; } - v->remote_family = f; + v->group_family = f; } else { if (r > 0) { log_syntax(unit, LOG_ERR, filename, line, 0, "vxlan %s cannot be a multicast address, ignoring assignment: %s", lvalue, rvalue); diff --git a/src/network/netdev/vxlan.h b/src/network/netdev/vxlan.h index 99d16c1ab91..03716f6f895 100644 --- a/src/network/netdev/vxlan.h +++ b/src/network/netdev/vxlan.h @@ -16,9 +16,11 @@ struct VxLan { int remote_family; int local_family; + int group_family; union in_addr_union remote; union in_addr_union local; + union in_addr_union group; unsigned tos; unsigned ttl;