eponymous alias <[EMAIL PROTECTED]> writes: > The getaddrinfo.c file contains these lines within getaddrinfo(): > > 151 if (hints && (hints->ai_flags & ~(AI_CANONNAME|AI_PASSIVE))) > 152 /* FIXME: Support more flags. */ > 153 return EAI_BADFLAGS; > > followed later by: > > 181 if (!(hints->ai_flags & AI_NUMERICSERV)) > 182 /* FIXME: Use getservbyname_r if available. */ > 183 se = getservbyname (servname, proto); > > But to properly support this latter code, the earlier test must include > the AI_NUMERICSERV flag.
Thanks, could you test the patch below? Please also test if AI_NUMERICSERV really works. If it doesn't work, the flag probably should be rejected. The code seems untested. /Simon 2006-11-28 Simon Josefsson <[EMAIL PROTECTED]> * lib/getaddrinfo.c (getaddrinfo): Don't reject AI_NUMERICSERV flags. Reported by eponymous alias <[EMAIL PROTECTED]>. --- getaddrinfo.c 17 Nov 2006 14:45:55 +0100 1.20 +++ getaddrinfo.c 28 Nov 2006 21:12:05 +0100 @@ -148,7 +148,7 @@ return getaddrinfo_ptr (nodename, servname, hints, res); #endif - if (hints && (hints->ai_flags & ~(AI_CANONNAME|AI_PASSIVE))) + if (hints && (hints->ai_flags & ~(AI_CANONNAME|AI_PASSIVE|AI_NUMERICSERV))) /* FIXME: Support more flags. */ return EAI_BADFLAGS;