]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - rdma/utils.c
rdma: Properly mark RDMAtool license
[mirror_iproute2.git] / rdma / utils.c
index 61f4aeb1bcf27ca5c345e152d1b8501c7c487310..bce052d5b17b11163d0f691ef8722cd9d119ef9a 100644 (file)
@@ -1,11 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
 /*
  * utils.c     RDMA tool
- *
- *              This program is free software; you can redistribute it and/or
- *              modify it under the terms of the GNU General Public License
- *              as published by the Free Software Foundation; either version
- *              2 of the License, or (at your option) any later version.
- *
  * Authors:     Leon Romanovsky <leonro@mellanox.com>
  */
 
@@ -425,8 +420,8 @@ int rd_attr_cb(const struct nlattr *attr, void *data)
        const struct nlattr **tb = data;
        int type;
 
-       if (mnl_attr_type_valid(attr, RDMA_NLDEV_ATTR_MAX) < 0)
-               /* We received uknown attribute */
+       if (mnl_attr_type_valid(attr, RDMA_NLDEV_ATTR_MAX - 1) < 0)
+               /* We received unknown attribute */
                return MNL_CB_OK;
 
        type = mnl_attr_get_type(attr);