Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-8829 mgs: fix default secure RPC rule display
[fs/lustre-release.git]
/
lustre
/
mgs
/
lproc_mgs.c
diff --git
a/lustre/mgs/lproc_mgs.c
b/lustre/mgs/lproc_mgs.c
index
134c829
..
ef22f46
100644
(file)
--- a/
lustre/mgs/lproc_mgs.c
+++ b/
lustre/mgs/lproc_mgs.c
@@
-81,19
+81,23
@@
out:
LPROC_SEQ_FOPS_RO(mgs_fs);
static void seq_show_srpc_rules(struct seq_file *seq, const char *tgtname,
LPROC_SEQ_FOPS_RO(mgs_fs);
static void seq_show_srpc_rules(struct seq_file *seq, const char *tgtname,
-
struct sptlrpc_rule_set *rset)
+ struct sptlrpc_rule_set *rset)
{
{
- struct sptlrpc_rule *r;
- char dirbuf[10];
- char flvrbuf[40];
- char net[LNET_NIDSTR_SIZE] = "default";
- int i;
+ struct sptlrpc_rule *r;
+ char dirbuf[10];
+ char flvrbuf[40];
+ char net_buf[LNET_NIDSTR_SIZE];
+ const char *net;
+ int i;
-
for (i = 0; i < rset->srs_nrule; i++) {
-
r = &rset->srs_rules[i];
+ for (i = 0; i < rset->srs_nrule; i++) {
+ r = &rset->srs_rules[i];
- if (r->sr_netid != LNET_NIDNET(LNET_NID_ANY))
- libcfs_net2str_r(r->sr_netid, net, sizeof(net));
+ if (r->sr_netid == LNET_NIDNET(LNET_NID_ANY))
+ net = "default";
+ else
+ net = libcfs_net2str_r(r->sr_netid, net_buf,
+ sizeof(net_buf));
if (r->sr_from == LUSTRE_SP_ANY && r->sr_to == LUSTRE_SP_ANY)
dirbuf[0] = '\0';
if (r->sr_from == LUSTRE_SP_ANY && r->sr_to == LUSTRE_SP_ANY)
dirbuf[0] = '\0';