For IPv6 testing in mgs_steal_client_llog_handler() the full NID
string was not being copied. Instead we copied the size of pointer
not the NID string. Copy the full NID string.
Fixes:
c0cb747e ("LU-13306 mgs: use large NIDS in the nid table on the MGS")
Change-Id: I7e19db0b0d3806c1c6fabe2ede0d880a45fe3052
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53115
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet_nid_t nodenid = lcfg->lcfg_nid;
char *nidstr = NULL;
+ BUILD_BUG_ON(sizeof(tmti->mti_nidlist[0]) != LNET_NIDSTR_SIZE);
if (!nodenid) {
nidstr = lustre_cfg_buf(lcfg, 2);
- if (!nidstr)
+ if (!nidstr || !strlen(nidstr))
RETURN(-ENODEV);
}
if (nidstr) {
if (dst) {
rc = strscpy(dst, nidstr,
- sizeof(nidstr));
+ LNET_NIDSTR_SIZE);
if (rc < 0)
RETURN(rc);
} else {