All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Hal Rosenstock
	<hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH rdma-core 3/3] ibacm: In acm_util.c:acm_if_iter_sys, try IPv4 if IPv6 doesn't find any appropriate interfaces
Date: Wed, 25 Oct 2017 10:22:35 -0600	[thread overview]
Message-ID: <20171025162235.GE15557@obsidianresearch.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A82373AB1A2521-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Wed, Oct 25, 2017 at 03:35:09PM +0000, Hefty, Sean wrote:
> > >> @@ -135,9 +136,12 @@ int acm_if_iter_sys(acm_if_iter_cb cb, void
> > >> *ctx)
> > >>  	size_t addr_len;
> > >>  	char *alias_sep;
> > >>
> > >> -	s = socket(AF_INET6, SOCK_DGRAM, 0);
> > >> -	if (!s)
> > >> -		return -1;
> > >> +next_family:
> > >> +	s = socket(family, SOCK_DGRAM, 0);
> > >> +	if (!s) {
> > >
> > > If ipv6 is disabled, wouldn't we fail here and could open an ipv4
> > socket?  So, we don't goto out just to go back to this location?
> > 
> > In the case where ipv6 is disabled in kernel, the socket is created
> > but the ioctl failed.
> 
> That seems goofy IMO.  Thanks for the explanation though.  :)

This explanation should go in the commit message..

Jason
--
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

  parent reply	other threads:[~2017-10-25 16:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 13:42 [PATCH rdma-core 3/3] ibacm: In acm_util.c:acm_if_iter_sys, try IPv4 if IPv6 doesn't find any appropriate interfaces Hal Rosenstock
     [not found] ` <8d19d9a9-1f97-408e-ca60-d42e67fbf60c-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-10-25 15:17   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A82373AB1A24BB-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-10-25 15:29       ` Hal Rosenstock
     [not found]         ` <cb3ecc66-d128-e735-4bc7-c35aca3fa915-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-10-25 15:35           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A82373AB1A2521-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-10-25 16:22               ` Jason Gunthorpe [this message]
     [not found]                 ` <20171025162235.GE15557-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-25 16:50                   ` Hal Rosenstock

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=20171025162235.GE15557@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.