summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-09-15 04:23:20 +0000
committernectar <nectar@FreeBSD.org>2002-09-15 04:23:20 +0000
commita0732e9360e7fd21a2175f288c2e3b56ed4c425a (patch)
treecd6f170ff90f26885247cdc37745e2507f189152 /lib/libc
parentcff87abbac5243f0a34923de8c9a99a54a663adb (diff)
downloadFreeBSD-src-a0732e9360e7fd21a2175f288c2e3b56ed4c425a.zip
FreeBSD-src-a0732e9360e7fd21a2175f288c2e3b56ed4c425a.tar.gz
Backout the increase of MAXPACKET from 1024 to 65536: it
broke pthreads. Reported by: mbr, tjr
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/getaddrinfo.c6
-rw-r--r--lib/libc/net/gethostbydns.c6
-rw-r--r--lib/libc/net/getnetbydns.c6
-rw-r--r--lib/libc/net/name6.c6
-rw-r--r--lib/libc/net/res_query.c6
-rw-r--r--lib/libc/net/res_update.c3
6 files changed, 26 insertions, 7 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index d933b7e..0f724f9 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -201,7 +201,11 @@ static const ns_src default_dns_files[] = {
{ 0 }
};
-#define MAXPACKET 65536
+#if PACKETSZ > 1024
+#define MAXPACKET PACKETSZ
+#else
+#define MAXPACKET 1024
+#endif
typedef union {
HEADER hdr;
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index 479cc4a..1044727 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -103,7 +103,11 @@ static void addrsort(char **, int);
static void dprintf(char *, int) __printflike(1, 0);
#endif
-#define MAXPACKET 65536
+#if PACKETSZ > 1024
+#define MAXPACKET PACKETSZ
+#else
+#define MAXPACKET 1024
+#endif
typedef union {
HEADER hdr;
diff --git a/lib/libc/net/getnetbydns.c b/lib/libc/net/getnetbydns.c
index c463176..369bf2b 100644
--- a/lib/libc/net/getnetbydns.c
+++ b/lib/libc/net/getnetbydns.c
@@ -88,7 +88,11 @@ extern int h_errno;
#define BYNAME 1
#define MAXALIASES 35
-#define MAXPACKET 65536
+#if PACKETSZ > 1024
+#define MAXPACKET PACKETSZ
+#else
+#define MAXPACKET 1024
+#endif
typedef union {
HEADER hdr;
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index 89b374c..d80f9c2 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -967,7 +967,11 @@ struct __res_type_list {
int rtl_type;
};
-#define MAXPACKET 65536
+#if PACKETSZ > 1024
+#define MAXPACKET PACKETSZ
+#else
+#define MAXPACKET 1024
+#endif
typedef union {
HEADER hdr;
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c
index e672586..4dde3e4 100644
--- a/lib/libc/net/res_query.c
+++ b/lib/libc/net/res_query.c
@@ -90,7 +90,11 @@ __FBSDID("$FreeBSD$");
#include "res_config.h"
-#define MAXPACKET 65536
+#if PACKETSZ > 1024
+#define MAXPACKET PACKETSZ
+#else
+#define MAXPACKET 1024
+#endif
/*
* Formulate a normal query, send, and await answer.
diff --git a/lib/libc/net/res_update.c b/lib/libc/net/res_update.c
index 0dac1ba..f17374f 100644
--- a/lib/libc/net/res_update.c
+++ b/lib/libc/net/res_update.c
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
*/
#define NSMAX 16
-#define MAXPACKET 65536
struct ns1 {
char nsname[MAXDNAME];
@@ -72,7 +71,7 @@ struct zonegrp {
int
res_update(ns_updrec *rrecp_in) {
ns_updrec *rrecp, *tmprrecp;
- u_char buf[PACKETSZ], answer[MAXPACKET], packet[2*PACKETSZ];
+ u_char buf[PACKETSZ], answer[PACKETSZ], packet[2*PACKETSZ];
char name[MAXDNAME], zname[MAXDNAME], primary[MAXDNAME],
mailaddr[MAXDNAME];
u_char soardata[2*MAXCDNAME+5*INT32SZ];
OpenPOWER on IntegriCloud