Fixed two problems:
1. The code that looks at btl_tcp_if_exclude before doing a modex_send uses strcmp rather than strncmp. That means that "lo0" gets sent even though "lo" is excluded. 2. The code that determines whether a particular local TCP interface can connect to a particular remote interface doesn't check for loopback interfaces. With this fix, users can now enable "lo" and be assured that it will only be used for intra- node communication. This commit was SVN r22762.
Этот коммит содержится в:
родитель
ec7fcf3f91
Коммит
18d9e96301
@ -610,7 +610,7 @@ static int mca_btl_tcp_component_create_instances(void)
|
||||
/* check to see if this interface exists in the exclude list */
|
||||
argv = exclude;
|
||||
while(argv && *argv) {
|
||||
if(strcmp(*argv,if_name) == 0)
|
||||
if(strncmp(*argv,if_name,strlen(*argv)) == 0)
|
||||
break;
|
||||
argv++;
|
||||
}
|
||||
|
@ -504,8 +504,18 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
|
||||
if(NULL != local_interfaces[i]->ipv4_address &&
|
||||
NULL != peer_interfaces[j]->ipv4_address) {
|
||||
|
||||
/* check for loopback */
|
||||
if ((opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv4_address)
|
||||
&& !opal_net_islocalhost((struct sockaddr *)peer_interfaces[j]->ipv4_address))
|
||||
|| (opal_net_islocalhost((struct sockaddr *)peer_interfaces[j]->ipv4_address)
|
||||
&& !opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv4_address))
|
||||
|| (opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv4_address)
|
||||
&& !opal_ifislocal(btl_proc->proc_ompi->proc_hostname))) {
|
||||
|
||||
/* No connection is possible on these interfaces */
|
||||
|
||||
/* check for RFC1918 */
|
||||
if(opal_net_addr_isipv4public((struct sockaddr*) local_interfaces[i]->ipv4_address)
|
||||
} else if(opal_net_addr_isipv4public((struct sockaddr*) local_interfaces[i]->ipv4_address)
|
||||
&& opal_net_addr_isipv4public((struct sockaddr*)
|
||||
peer_interfaces[j]->ipv4_address)) {
|
||||
if(opal_net_samenetwork((struct sockaddr*) local_interfaces[i]->ipv4_address,
|
||||
@ -534,7 +544,18 @@ int mca_btl_tcp_proc_insert( mca_btl_tcp_proc_t* btl_proc,
|
||||
*/
|
||||
if(NULL != local_interfaces[i]->ipv6_address &&
|
||||
NULL != peer_interfaces[j]->ipv6_address) {
|
||||
if(opal_net_samenetwork((struct sockaddr*) local_interfaces[i]->ipv6_address,
|
||||
|
||||
/* check for loopback */
|
||||
if ((opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv6_address)
|
||||
&& !opal_net_islocalhost((struct sockaddr *)peer_interfaces[j]->ipv6_address))
|
||||
|| (opal_net_islocalhost((struct sockaddr *)peer_interfaces[j]->ipv6_address)
|
||||
&& !opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv6_address))
|
||||
|| (opal_net_islocalhost((struct sockaddr *)local_interfaces[i]->ipv6_address)
|
||||
&& !opal_ifislocal(btl_proc->proc_ompi->proc_hostname))) {
|
||||
|
||||
/* No connection is possible on these interfaces */
|
||||
|
||||
} else if(opal_net_samenetwork((struct sockaddr*) local_interfaces[i]->ipv6_address,
|
||||
(struct sockaddr*) peer_interfaces[j]->ipv6_address,
|
||||
local_interfaces[i]->ipv6_netmask)) {
|
||||
weights[i][j] = CQ_PUBLIC_SAME_NETWORK;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user