James Carlson wrote:
> Peter Dunlap writes:
>   
>> http://cr.opensolaris.org/~pdunlap/iscsit-webrev/webrev/
>>     
>
>   1006,1010: what is this about?  Why would you want "either" IPv6 or
>   IPv4?  Shouldn't you either know exactly which one you want, or need
>   to construct *both*?
>   

Hi James,

I realize this is a bit of a delayed reaction but I don't really 
understand this comment -- it sounds like this code doesn't do what we 
think it does:

991 idm_status_t
 992 idm_so_tgt_svc_online(idm_svc_t *is)
 993 {
 994         idm_so_svc_t            *so_svc;
 995         idm_svc_req_t           *sr = &is->is_svc_req;
 996         struct sockaddr_in      sin_ip;
 997         struct sockaddr_in6     sin6_ip;
 998         uint32_t                on = 1;
 999 
1000         mutex_enter(&is->is_mutex);
1001         so_svc = (idm_so_svc_t *)is->is_so_svc;
1002 
1003         /*
1004          * Try creating an IPv6 socket first
1005          */
1006         if ((so_svc->is_so = idm_socreate(PF_INET6, SOCK_STREAM, 0)) == 
NULL) {
1007                 /*
1008                  * If failed, try creating an IPv4 socket
1009                  */
1010                 if ((so_svc->is_so = idm_socreate(PF_INET, SOCK_STREAM, 0))
1011                     == NULL) {
1012                         mutex_exit(&is->is_mutex);
1013                         return (IDM_STATUS_FAIL);
1014                 } else {



The intent was to accept both IPv6 and IPv4 connections and I think the 
logic is trying to "fall back to IPv4-only" if IPv6 is not available.  
Are you saying that we can get by with just the PF_INET6 socket assuming 
we always want to accept both IPv6 and IPv4 connections?  Is there any 
configuration where we would not be able to create the IPv6 listening 
socket in Nevada?

I'm happy to remove the second call to idm_socreate if it's superfluous.

-Peter

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to