Skip to contentSkip to conversation

ibacm/libacm.c: Use IPv4 rather than IPv6 for ACM server communication

PATCH In review Hal Rosenstock 3 participants 3 messages Apr 5, 2012 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ibacm/libacm.c: Use IPv4 rather than IPv6 for ACM server communication

When both IPv4 and IPv6 are running, getaddrinfo indicates IPv6 rather than IPv4 and that currently causes a failure to connect to the ACM server. Fix is to set the address family in the hint to getaddrinfo to IPv4.

---

src/libacm.c +1 -0
index 727741f..5ca1abc 100644
@@ -75,6 +75,7 @@ int ib_acm_connect(char *dest)
 
 	acm_set_server_port();
 	memset(&hint, 0, sizeof hint);
+	hint.ai_family = AF_INET;
 	hint.ai_protocol = IPPROTO_TCP;
 	ret = getaddrinfo(dest, NULL, &hint, &res);
 	if (ret)

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 4F7DFB04.2030803-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org

#2 lore raw
Quoted 4 lines · Hal Rosenstock

When both IPv4 and IPv6 are running, getaddrinfo indicates IPv6 rather than IPv4 and that currently causes a failure to connect to the ACM server. Fix is to set the address family in the hint to getaddrinfo to IPv4.

We are in the future, the daemon should listen for IPv6 connections.

Drepper has a description on how to do this properly:

http://www.akkadia.org/drepper/userapi-ipv6.html

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html