summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorNatanael Copa <natanael.copa@gmail.com>2011-06-12 12:09:04 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-06-14 10:46:20 +0200
commitbc3be18145e4d57e7268506f123c0f0f373a15e2 (patch)
treec5f1d50d6edf97f403abf6e13b2790fc9d6ac52c /libc
parent2fa7315f3456d13512e9a65848c4f0874fce9c5b (diff)
getaddrinfo: allow numeric service without any hints
This appears to correspond to what glibc does and this fixes an issue with iptables-1.4.11 with udp and raw port numbers. (see http://bugzilla.netfilter.org/show_bug.cgi?id=721) This fixes #3841 https://bugs.busybox.net/show_bug.cgi?id=3841 Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/getaddrinfo.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c
index 1a77c5199..e7511f6c4 100644
--- a/libc/inet/getaddrinfo.c
+++ b/libc/inet/getaddrinfo.c
@@ -820,13 +820,6 @@ getaddrinfo(const char *name, const char *service,
if (hints->ai_flags & AI_NUMERICSERV)
return EAI_NONAME;
gaih_service.num = -1;
- } else {
- /*
- * Can't specify a numerical socket unless a protocol
- * family was given.
- */
- if (hints->ai_socktype == 0 && hints->ai_protocol == 0)
- return EAI_SERVICE;
}
pservice = &gaih_service;
} else