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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux