Whamcloud - gitweb
LU-16859 lnet: incorrect check for duplicate NI
When NI is being added to an existing LNet, checking against
existing NI interface names currently fails if the new NI
happens to use interface name which is a prefix of one used
by an existing NI.
The following example assumes ib0 and its alias ib0:1 are
configured:
lnetctl net add --net o2ib --if ib0:1
lnetctl net add --net o2ib --if ib0
Fix this by making sure interface strings are compared properly
regardless of relative length.
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I0d4047118e7d9982fa791a2e324a27aa5d4abaee
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52918
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>