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-13642 lnet: Allow dynamic IP specification
[fs/lustre-release.git]
/
lnet
/
utils
/
lnetconfig
/
liblnetconfig.c
diff --git
a/lnet/utils/lnetconfig/liblnetconfig.c
b/lnet/utils/lnetconfig/liblnetconfig.c
index
958b5cb
..
f350e32
100644
(file)
--- a/
lnet/utils/lnetconfig/liblnetconfig.c
+++ b/
lnet/utils/lnetconfig/liblnetconfig.c
@@
-320,6
+320,8
@@
int lustre_lnet_parse_interfaces(char *intf_str,
return LUSTRE_CFG_RC_BAD_PARAM;
while (cur < end) {
return LUSTRE_CFG_RC_BAD_PARAM;
while (cur < end) {
+ char *net;
+
open_square = strchr(cur, '[');
if (open_square != NULL) {
close_square = strchr(cur, ']');
open_square = strchr(cur, '[');
if (open_square != NULL) {
close_square = strchr(cur, ']');
@@
-347,6
+349,10
@@
int lustre_lnet_parse_interfaces(char *intf_str,
}
}
}
}
+ /* Extract net id if its a NID string */
+ net = strchr(cur, '@');
+ if (net)
+ nw_descr->nw_id = libcfs_str2net(net + 1);
rc = lustre_lnet_add_intf_descr(&nw_descr->nw_intflist, cur, len);
if (rc != LUSTRE_CFG_RC_NO_ERR)
goto failed;
rc = lustre_lnet_add_intf_descr(&nw_descr->nw_intflist, cur, len);
if (rc != LUSTRE_CFG_RC_NO_ERR)
goto failed;