content-type: text/html; charset="utf-8" Content-Transfer-Encoding: base64 X-RT-Original-Encoding: utf-8 Content-Length: 1694

Hi,

This is Ganesh P , Would like to know whether the look-up logic of omapi_io_states is appropriate when picking up the correct state information  for the given ( input ) cbarg.

Existing Logic:

omapi_iscsock_cb(isc_task_t   *task,
                 isc_socket_t *socket,
                 void         *cbarg,
                 int           flags)
{
#if SOCKDELETE
        /*
         * walk through the io states list, if our object is on there
         * service it.  if not ignore it.
         */
        for (obj = omapi_io_states.next; (obj != NULL) ; obj = obj->next) {
                if (obj == cbarg) {
                        break;
                }
        }

        if (obj == NULL)  {
                return(0);
        }
#else
}

"obj = obj->next" is this condition to be removed from for loop ? because of having it we might never do a comparison of last state of  "omapi_io_states" , isn't it ?

 in existing code flow  ,  failing to find an appropriate  "omapi_io_states" ( i.e no match with "cbarg" )  can lead to invocation of  "status = obj->reader(obj->inner);" and hence "dhcp" process might wait on an UNSET FD and blocks forever ? 

Can you please clarify ?

Thanks in advance ,

Ganesh.