Reverted r17331, r17332. Still broken. I'm in a bad hurry. :-( Re #1206
This commit was SVN r17333. The following SVN revision numbers were found above: r17331 --> open-mpi/ompi@3846e2a797 r17332 --> open-mpi/ompi@c03de08c55
Этот коммит содержится в:
родитель
c03de08c55
Коммит
8ae4a10b4c
@ -329,60 +329,30 @@ bool mca_btl_tcp_proc_accept(mca_btl_tcp_proc_t* btl_proc, struct sockaddr* addr
|
|||||||
OPAL_THREAD_LOCK(&btl_proc->proc_lock);
|
OPAL_THREAD_LOCK(&btl_proc->proc_lock);
|
||||||
for( i = 0; i < btl_proc->proc_endpoint_count; i++ ) {
|
for( i = 0; i < btl_proc->proc_endpoint_count; i++ ) {
|
||||||
mca_btl_base_endpoint_t* btl_endpoint = btl_proc->proc_endpoints[i];
|
mca_btl_base_endpoint_t* btl_endpoint = btl_proc->proc_endpoints[i];
|
||||||
uint16_t remote_kernel_index;
|
|
||||||
bool matched = false;
|
|
||||||
uint16_t j;
|
|
||||||
|
|
||||||
/* Check all conditions before going to try to accept the connection. */
|
/* Check all conditions before going to try to accept the connection. */
|
||||||
if( btl_endpoint->endpoint_addr->addr_family != addr->sa_family ) {
|
if( btl_endpoint->endpoint_addr->addr_family != addr->sa_family ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for alias addresses: aliases share the same remote
|
switch (addr->sa_family) {
|
||||||
* kernel_index, so if the addresses don't match, it can still be
|
case AF_INET:
|
||||||
* an alias of one we want to accept.
|
if( memcmp( &btl_endpoint->endpoint_addr->addr_inet,
|
||||||
*/
|
&(((struct sockaddr_in*)addr)->sin_addr),
|
||||||
remote_kernel_index = btl_endpoint->endpoint_addr->addr_ifkindex;
|
sizeof(struct in_addr) ) ) {
|
||||||
|
|
||||||
for (j=0; j < btl_proc->proc_addr_count; j++) {
|
|
||||||
mca_btl_tcp_addr_t* exported_address = btl_proc->proc_addrs + j;
|
|
||||||
|
|
||||||
if (remote_kernel_index != exported_address->addr_ifkindex) {
|
|
||||||
/* kernel_index doesn't match, so that's not a possible
|
|
||||||
* alias
|
|
||||||
*/
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
switch (addr->sa_family) {
|
|
||||||
case AF_INET:
|
|
||||||
/* if (aliases) addresses match, accept it */
|
|
||||||
if(!memcmp( &exported_address->addr_inet,
|
|
||||||
&(((struct sockaddr_in*)addr)->sin_addr),
|
|
||||||
sizeof(struct in_addr) ) ) {
|
|
||||||
matched = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#if OPAL_WANT_IPV6
|
#if OPAL_WANT_IPV6
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
if(IN6_ARE_ADDR_EQUAL(
|
if( memcmp( &btl_endpoint->endpoint_addr->addr_inet,
|
||||||
&exported_address->addr_inet,
|
&(((struct sockaddr_in6*)addr)->sin6_addr),
|
||||||
&(((struct sockaddr_in6*)addr)->sin6_addr))) {
|
sizeof(struct in6_addr) ) ) {
|
||||||
matched = true;
|
continue;
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
#endif
|
||||||
/* do we have a match for the incoming address? Read: is there a
|
default:
|
||||||
* btl_endpoint with an address configured for the same remote
|
;
|
||||||
* NIC? If not, check the next btl_endpoint
|
|
||||||
*/
|
|
||||||
if (false == matched) {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mca_btl_tcp_endpoint_accept(btl_endpoint, addr, sd)) {
|
if(mca_btl_tcp_endpoint_accept(btl_endpoint, addr, sd)) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user