summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/getaddrinfo.c
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-09-13 20:31:29 +0000
committernectar <nectar@FreeBSD.org>2002-09-13 20:31:29 +0000
commit57c880964051d411ff6f58ea80ab93527222defb (patch)
tree4abdf8e587e50c215c8768bca481fe102ec47c16 /lib/libc/net/getaddrinfo.c
parent413ebcf5d275744ebcbceaba55b2ab7e96701269 (diff)
downloadFreeBSD-src-57c880964051d411ff6f58ea80ab93527222defb.zip
FreeBSD-src-57c880964051d411ff6f58ea80ab93527222defb.tar.gz
When using res_send/res_query/res_search, the caller must either
insure enough space is available for the response, or be prepared to resize the buffer and retry as necessary. Do the conservative thing and make sure enough space is available. Reviewed by: silence on freebsd-audit
Diffstat (limited to 'lib/libc/net/getaddrinfo.c')
-rw-r--r--lib/libc/net/getaddrinfo.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 0f724f9..d933b7e 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -201,11 +201,7 @@ static const ns_src default_dns_files[] = {
{ 0 }
};
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
+#define MAXPACKET 65536
typedef union {
HEADER hdr;
OpenPOWER on IntegriCloud