cfs_match_nid_net() needs to check whether the list of range
expressions describing the address is empty. Otherwise, for numeric
based addresses, we may hit the assert in libcfs_num_match().
Test-Parameters: trivial testlist=sanity-lnet
HPE-bug-id: LUS-11480
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Id2460137607f5564751e729ee7b716d9151b5d37
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50576
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: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
__u32 address;
struct netstrfns *nf;
- if (!addr || !net_num_list)
+ if (!addr || list_empty(addr) || !net_num_list)
return 0;
nf = type2net_info(LNET_NETTYP(LNET_NID_NET(nid)));
- if (!nf || !net_num_list || !addr)
+ if (!nf)
return 0;
/* FIXME handle long-addr nid */
}
run_test 401 "Discover peer after adding peer net UDSP rule"
+test_402() {
+ reinit_dlc || return $?
+
+ do_lnetctl udsp add --dst kfi --priority 0 ||
+ error "Failed to add UDSP rule"
+
+ do_lnetctl peer add --prim 402@kfi ||
+ error "Failed to add peer"
+
+ return 0
+}
+run_test 402 "Destination net rule should not panic"
+
complete $SECONDS
cleanup_testsuite