]> git.proxmox.com Git - mirror_iproute2.git/commit
rdma: Fix incorrectly handled NLA validation
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 30 Dec 2018 13:34:09 +0000 (15:34 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 1 Jan 2019 06:15:13 +0000 (22:15 -0800)
commitf0cabaca38e5fafb455373e2d2747afecc7299fd
treed1af1f114e938e66f111c26f81fa2e330deb5445
parentcb65a9cb81c95028bc97f421b0c4cfbf749f621c
rdma: Fix incorrectly handled NLA validation

mnl_attr_type_valid() receives maximum attribute type, which means that
we were supposed to supply the latest valid netlink attribute and not
the number of attributes. Such coding mistake caused to failures while
NLA attributes were extended.

Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
rdma/utils.c