X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Flnet%2Fapi-ni.c;h=18159a38ccb747c65a85346025109439ef05b7a0;hb=c75b6fe3f147206ee3fd10fb0ee55a06245c0a4f;hp=4bc70c66a619afb8a877ac803c4f4b0ee79dee28;hpb=f3237a16e367e13eb8d29bab66903757ba8fdd62;p=fs%2Flustre-release.git diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 4bc70c6..18159a3 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -7413,7 +7413,7 @@ static int lnet_route_cmd(struct sk_buff *skb, struct genl_info *info) } hops = nla_get_s64(route_prop); - if (hops < 1 || hops > 255) { + if ((hops < 1 || hops > 255) && hops != -1) { GENL_SET_ERR_MSG(info, "invalid hop count must be between 1 and 255"); GOTO(report_err, rc = -EINVAL);