@@ -826,6 +826,7 @@ struct lnet_inetdev {
u32 li_flags;
u32 li_ipaddr;
u32 li_netmask;
+ u32 li_index;
char li_name[IFNAMSIZ];
};
@@ -2522,11 +2522,11 @@ ksocknal_startup(struct lnet_ni *ni)
}
ni->ni_dev_cpt = ifaces[i].li_cpt;
+ ksi->ksni_index = ifaces[i].li_index;
sa = (void *)&ksi->ksni_addr;
memset(sa, 0, sizeof(*sa));
sa->sin_family = AF_INET;
sa->sin_addr.s_addr = htonl(ifaces[i].li_ipaddr);
- ksi->ksni_index = ksocknal_ip2index((struct sockaddr *)sa, ni);
ksi->ksni_netmask = ifaces[i].li_netmask;
strlcpy(ksi->ksni_name, ifaces[i].li_name, sizeof(ksi->ksni_name));
@@ -1538,6 +1538,7 @@ int lnet_inet_enumerate(struct lnet_inetdev **dev_list, struct net *ns)
ifaces[nip].li_cpt = cpt;
ifaces[nip].li_flags = flags;
+ ifaces[nip].li_index = dev->ifindex;
ifaces[nip].li_ipaddr = ntohl(ifa->ifa_local);
ifaces[nip].li_netmask = ntohl(ifa->ifa_mask);
strlcpy(ifaces[nip].li_name, ifa->ifa_label,