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.
Lustre-change: https://review.whamcloud.com/52918
Lustre-commit:
7dcdb9eb0ded98e956fe417abbd835433a8de3f0
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I0d4047118e7d9982fa791a2e324a27aa5d4abaee
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53527
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>