LU-16307 util: fix lnetctl bugs that break sanity-sec
For lnetctl net commands you always need a --net option. For the
case of creating a local NI you need a list of interfaces.
For yaml_lnet_config_ni() I was always requiring a list of
interfaces which is wrong. Only test for missing interfaces
for the NLM_F_CREATE case.
Second bug is if we fail to detect Netlink we use the old api.
We end up freeing some needed parameters instead of passing
them to old APIs. Jump to old api code without freeing parameter
data.
Fixes:
8f8f6e2f3 ("LU-10003 lnet: use Netlink to support old and new NI APIs.")
Change-Id: I4b11372b9afa8023bcbaba3297dd04196d22ef05
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49129
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>