"UNKNOWN" (IF_OPER_UNKNOWN) operational state doesn't necessarily
mean that the interface can't be used and may be the result of
particular network driver not providing UP/DOWN states,
so it may be incorrect for socklnd to initiate
setting of a "fatal error" flag on a NI using an interface
in "UNKNOWN" operstate.
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I39dfa01f3758809440d50cf8b6b11555889ef366
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52842
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
if ((ret == -1) ||
((dev->reg_state == NETREG_UNREGISTERING) ||
- (dev->operstate != IF_OPER_UP)) ||
+ ((dev->operstate != IF_OPER_UP) &&
+ (dev->operstate != IF_OPER_UNKNOWN))) ||
(lnet_get_link_status(dev) == 0))
*dev_status = 0;
struct ksock_net *net;
struct ksock_net *cnxt;
int ifindex;
- unsigned char link_down = !(operstate == IF_OPER_UP);
+ unsigned char link_down;
struct in_device *in_dev;
bool found_ip = false;
struct ksock_interface *ksi = NULL;
int state;
DECLARE_CONST_IN_IFADDR(ifa);
+ link_down = !((operstate == IF_OPER_UP) || (operstate == IF_OPER_UNKNOWN));
ifindex = dev->ifindex;
if (!ksocknal_data.ksnd_nnets)