Whamcloud - gitweb
LU-11893 ksocklnd: add secondary IP address handling 92/34392/14
authorJames Simmons <uja.ornl@yahoo.com>
Mon, 20 May 2019 15:09:07 +0000 (11:09 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 May 2019 04:24:33 +0000 (04:24 +0000)
commit9a2013af0668737dc56424c5c6eaac01621f6c17
tree0e3cd7f42efa9d815e68f1490daf75ab274244e2
parentf15995b8e52bafabe55506ad2e12c8a64a373948
LU-11893 ksocklnd: add secondary IP address handling

With ksocknal_enumerate_interfaces() use of for_primary_ifa() only
primary IP addresses are returned. This disables using network
aliasing which some people use. Change for_primary_ifa() to
for_ifa() so we can detect any secondary IP addresses. Update the
string handling since ifa_device names can be different than the
net_device name. Discard the 'j' counter and instead keep
ksnn_ninterfaces up to date. This measn that we return 0 on
sucess, rather than a count of added interfaces. Update the
too many interfaces test in ksocknal_enumerate_interfaces()
with a better test using ARRAY_SIZE.

Change-Id: I832df89148def5088502ac92df27b8b3872f3792
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/34392
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/socklnd/socklnd.c