Whamcloud - gitweb
LU-10391 lnet: use correct type in nid_addr_is_set 38/54338/2
authorJames Simmons <jsimmons@infradead.org>
Sat, 9 Mar 2024 00:47:09 +0000 (19:47 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 23 Mar 2024 05:50:12 +0000 (05:50 +0000)
commitde67af9f4f4b394c5d08e67ff3e8355e45183381
treee036dd5d766e9d2d47bb90584e8f7cc7e6083bdf
parent0bb4325ba33560d6ddae8d09610bc22b76ff88bb
LU-10391 lnet: use correct type in nid_addr_is_set

For nid_addr_is_set() we use NID_ADDR_BYTES macro to scan the
nid_addrs in struct lnet_nid. Each nid_addr is actually u32
so we are going beyond the 4 nid_addr that exist to see if
the nid_addr is set. Fix this by casting nid_addr to u8 so we
can scan by each byte properly.

Fixes: 14cdcd61985 ("LU-13642 lnet: Allow IP specification")
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: I220bc9d2adad09225ce44f7c1b96fba5a8f6dd26
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54338
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/uapi/linux/lnet/lnet-types.h