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]

 



> >> @@ -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.  :)


��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[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