]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: VXLAN rename Id to VNI
authorSusant Sahani <ssahani@redhat.com>
Tue, 7 May 2019 05:01:22 +0000 (10:31 +0530)
committerSusant Sahani <ssahani@redhat.com>
Tue, 7 May 2019 15:22:11 +0000 (20:52 +0530)
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

man/systemd.netdev.xml
src/network/netdev/netdev-gperf.gperf
src/network/netdev/vxlan.c
src/network/netdev/vxlan.h
test/fuzz/fuzz-netdev-parser/directives.netdev
test/test-network/conf/25-vxlan.netdev

index 4cb3258c111c0d24880886bf80c2121abccbb040..3841ad54b72a8b1217b5a4f2b8231b32e42fb600 100644 (file)
 
     <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>
index 16636601a0ffcf609223d2aa823b0bef375c9f77..163d7d01d2abe53a7592dfce3e74bb430fc28609 100644 (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)
index 4b855ae1e1161b3d76f989b2da053dda1b1ca930..c8d9cd4675713a873131d7a98a14c546c8cbbf77 100644 (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;
index 3b273e97bdbbf58f6d44361c923c85405ced4eb1..99d16c1ab91832b2bd910c7af49f1ab4b380df04 100644 (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;
index ab7d9f6fc96fb9a7b8444e7ddc0eb0717957d967..0d0bd2c85b208ec626bcb5b6b1dc60c58efdb396 100644 (file)
@@ -93,6 +93,7 @@ Group=
 FDBAgeingSec=
 MacLearning=
 Id=
+VNI=
 RemoteChecksumRx=
 TOS=
 L2MissNotification=
index 819a58356faa1867ae571d649ec93577fd9aeff6..d5acf48da5b56cee4aa72b40e24f04cc9c1f2534 100644 (file)
@@ -3,7 +3,7 @@ Name=vxlan99
 Kind=vxlan
 
 [VXLAN]
-Id=999
+VNI=999
 L2MissNotification=true
 L3MissNotification=true
 RouteShortCircuit=true