networkd: VXLAN rename Id to VNI

It makes more sense to call VXLAN ID as

1. the VXLAN Network Identifier (VNI) (or VXLAN Segment ID)
2. test-network: rename VXLAN Id to VNI
3. fuzzer: Add VXLAN VNI directive to fuzzer
This commit is contained in:
Susant Sahani 2019-05-07 10:31:22 +05:30
parent ca49c7f9aa
commit 6f213e4a34
6 changed files with 12 additions and 10 deletions

View file

@ -527,9 +527,9 @@
<variablelist class='network-directives'>
<varlistentry>
<term><varname>Id=</varname></term>
<term><varname>VNI=</varname></term>
<listitem>
<para>The VXLAN ID to use. Takes a number in the range 1-16777215.</para>
<para>The VXLAN Network Identifier (or VXLAN Segment ID). Takes a number in the range 1-16777215.</para>
</listitem>
</varlistentry>
<varlistentry>

View file

@ -96,7 +96,8 @@ L2TPSession.Name, config_parse_l2tp_session_name,
Peer.Name, config_parse_ifname, 0, offsetof(Veth, ifname_peer)
Peer.MACAddress, config_parse_hwaddr, 0, offsetof(Veth, mac_peer)
VXCAN.Peer, config_parse_ifname, 0, offsetof(VxCan, ifname_peer)
VXLAN.Id, config_parse_uint64, 0, offsetof(VxLan, id)
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.Local, config_parse_vxlan_address, 0, offsetof(VxLan, local)
VXLAN.Remote, config_parse_vxlan_address, 0, offsetof(VxLan, remote)

View file

@ -27,8 +27,8 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
assert(v);
if (v->id <= VXLAN_VID_MAX) {
r = sd_netlink_message_append_u32(m, IFLA_VXLAN_ID, v->id);
if (v->vni <= VXLAN_VID_MAX) {
r = sd_netlink_message_append_u32(m, IFLA_VXLAN_ID, v->vni);
if (r < 0)
return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_ID attribute: %m");
}
@ -273,8 +273,8 @@ static int netdev_vxlan_verify(NetDev *netdev, const char *filename) {
assert(v);
assert(filename);
if (v->id > VXLAN_VID_MAX) {
log_warning("VXLAN without valid Id configured in %s. Ignoring", filename);
if (v->vni > VXLAN_VID_MAX) {
log_warning("VXLAN without valid VNI (or VXLAN Segment ID) configured in %s. Ignoring", filename);
return -EINVAL;
}
@ -290,7 +290,7 @@ static void vxlan_init(NetDev *netdev) {
assert(v);
v->id = VXLAN_VID_MAX + 1;
v->vni = VXLAN_VID_MAX + 1;
v->learning = true;
v->udpcsum = false;
v->udp6zerocsumtx = false;

View file

@ -12,7 +12,7 @@ typedef struct VxLan VxLan;
struct VxLan {
NetDev meta;
uint64_t id;
uint64_t vni;
int remote_family;
int local_family;

View file

@ -93,6 +93,7 @@ Group=
FDBAgeingSec=
MacLearning=
Id=
VNI=
RemoteChecksumRx=
TOS=
L2MissNotification=

View file

@ -3,7 +3,7 @@ Name=vxlan99
Kind=vxlan
[VXLAN]
Id=999
VNI=999
L2MissNotification=true
L3MissNotification=true
RouteShortCircuit=true