Whamcloud - gitweb
LU-11893 ksocklnd: add secondary IP address handling 59/35159/4
authorJames Simmons <uja.ornl@yahoo.com>
Tue, 11 Jun 2019 07:49:50 +0000 (00:49 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 27 Jun 2019 21:47:31 +0000 (21:47 +0000)
commiteb46e3374193895b01fe16a8975553c87133a52e
treeb3d2d200be9d455ef0ec14066c113a64438d88cf
parent8da485ecc5d836e8b514d1d16b552de3ce0ab43e
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.

This patch is back-ported from the following one:
Lustre-commit: 9a2013af0668737dc56424c5c6eaac01621f6c17
Lustre-change: https://review.whamcloud.com/34392

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