Jayachandran C. <[EMAIL PROTECTED]> wrote: > > Problem Description: > In the existing code, if the protocol is not supported, "answer" > will be NULL and an error code of -ESOCKTNOSUPPORT will be returned. > The condition "if(!protocol)" which returns -EPROTONOSUPPORT will > never be reached because the value of protocol cannot be 0(IPPROTO_IP), > when the answer != NULL.
I agree with your analysis that protocol can't be NULL. However, ESOCKTNOSUPPORT is not defined by POSIX, so perhaps we should always return EPROTONOSUPPORT. What do you think Dave? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html