public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] ibacm/libacm.c: Use IPv4 rather than IPv6 for ACM server communication
Date: Thu, 05 Apr 2012 16:05:24 -0400	[thread overview]
Message-ID: <4F7DFB04.2030803@dev.mellanox.co.il> (raw)


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.

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/libacm.c b/src/libacm.c
index 727741f..5ca1abc 100644
--- a/src/libacm.c
+++ b/src/libacm.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2012-04-05 20:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 20:05 Hal Rosenstock [this message]
     [not found] ` <4F7DFB04.2030803-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-04-05 20:51   ` [PATCH] ibacm/libacm.c: Use IPv4 rather than IPv6 for ACM server communication Jason Gunthorpe
2012-04-05 23:28   ` Hefty, Sean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F7DFB04.2030803@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox