diff options
Diffstat (limited to 'ext/socket/getaddrinfo.c')
-rw-r--r-- | ext/socket/getaddrinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index de16b9fb12..ef01a607be 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -375,6 +375,8 @@ getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *h pai->ai_protocol = IPPROTO_UDP; } port = htons((unsigned short)atoi(servname)); + } else if (pai->ai_flags & AI_NUMERICSERV) { + ERR(EAI_NONAME); } else { struct servent *sp; const char *proto; |