]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - bind/patches/bind97-rh570851.patch
bind: Rework package.
[people/ms/ipfire-3.x.git] / bind / patches / bind97-rh570851.patch
CommitLineData
ac29baf9
SS
1diff -up bind-9.7.2b1/bin/dig/dighost.c.rh570851 bind-9.7.2b1/bin/dig/dighost.c
2--- bind-9.7.2b1/bin/dig/dighost.c.rh570851 2010-08-10 12:55:14.219403986 +0200
3+++ bind-9.7.2b1/bin/dig/dighost.c 2010-08-10 12:56:40.716015777 +0200
4@@ -126,7 +126,8 @@ isc_boolean_t
5 usesearch = ISC_FALSE,
6 showsearch = ISC_FALSE,
7 qr = ISC_FALSE,
8- is_dst_up = ISC_FALSE;
9+ is_dst_up = ISC_FALSE,
10+ verbose = ISC_FALSE;
11 in_port_t port = 53;
12 unsigned int timeout = 0;
13 unsigned int extrabytes;
14@@ -1240,10 +1241,24 @@ setup_system(void) {
15 }
16 }
17
18+ if (lwconf->resdebug) {
19+ verbose = ISC_TRUE;
20+ debug("verbose is on");
21+ }
22 if (ndots == -1) {
23 ndots = lwconf->ndots;
24 debug("ndots is %d.", ndots);
25 }
26+ if (lwconf->attempts) {
27+ tries = lwconf->attempts + 1;
28+ if (tries < 2)
29+ tries = 2;
30+ debug("tries is %d.", tries);
31+ }
32+ if (lwconf->timeout) {
33+ timeout = lwconf->timeout;
34+ debug("timeout is %d.", timeout);
35+ }
36
37 /* If user doesn't specify server use nameservers from resolv.conf. */
38 if (ISC_LIST_EMPTY(server_list))
39diff -up bind-9.7.2b1/bin/dig/host.c.rh570851 bind-9.7.2b1/bin/dig/host.c
40--- bind-9.7.2b1/bin/dig/host.c.rh570851 2010-08-10 12:57:16.032758098 +0200
41+++ bind-9.7.2b1/bin/dig/host.c 2010-08-10 13:02:12.848559845 +0200
42@@ -659,6 +659,7 @@ parse_args(isc_boolean_t is_batchfile, i
43
44 lookup->servfail_stops = ISC_FALSE;
45 lookup->comments = ISC_FALSE;
46+ short_form = !verbose;
47
48 while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
49 switch (c) {
50@@ -869,8 +870,8 @@ main(int argc, char **argv) {
51 result = isc_app_start();
52 check_result(result, "isc_app_start");
53 setup_libs();
54- parse_args(ISC_FALSE, argc, argv);
55 setup_system();
56+ parse_args(ISC_FALSE, argc, argv);
57 result = isc_app_onrun(mctx, global_task, onrun_callback, NULL);
58 check_result(result, "isc_app_onrun");
59 isc_app_run();
60diff -up bind-9.7.2b1/bin/dig/include/dig/dig.h.rh570851 bind-9.7.2b1/bin/dig/include/dig/dig.h
61--- bind-9.7.2b1/bin/dig/include/dig/dig.h.rh570851 2010-08-10 13:02:32.722244088 +0200
62+++ bind-9.7.2b1/bin/dig/include/dig/dig.h 2010-08-10 13:02:48.465158159 +0200
63@@ -278,6 +278,7 @@ extern isc_boolean_t debugging, memdebug
64 extern char *progname;
65 extern int tries;
66 extern int fatalexit;
67+extern isc_boolean_t verbose;
68 #ifdef WITH_IDN
69 extern int idnoptions;
70 #endif
71diff -up bind-9.7.2b1/lib/lwres/include/lwres/lwres.h.rh570851 bind-9.7.2b1/lib/lwres/include/lwres/lwres.h
72--- bind-9.7.2b1/lib/lwres/include/lwres/lwres.h.rh570851 2010-08-10 13:04:40.465780506 +0200
73+++ bind-9.7.2b1/lib/lwres/include/lwres/lwres.h 2010-08-10 13:05:57.559867830 +0200
74@@ -243,6 +243,8 @@ typedef struct {
75 lwres_uint8_t resdebug; /*%< non-zero if 'options debug' set */
76 lwres_uint8_t ndots; /*%< set to n in 'options ndots:n' */
77 lwres_uint8_t no_tld_query; /*%< non-zero if 'options no_tld_query' */
78+ lwres_int32_t attempts; /*%< set to n in 'options attempts:n' */
79+ lwres_int32_t timeout; /*%< set to n in 'options timeout:n' */
80 } lwres_conf_t;
81
82 #define LWRES_ADDRTYPE_V4 0x00000001U /*%< ipv4 */
83diff -up bind-9.7.2b1/lib/lwres/lwconfig.c.rh570851 bind-9.7.2b1/lib/lwres/lwconfig.c
84--- bind-9.7.2b1/lib/lwres/lwconfig.c.rh570851 2010-08-10 13:06:08.051778429 +0200
85+++ bind-9.7.2b1/lib/lwres/lwconfig.c 2010-08-10 13:09:53.972555776 +0200
86@@ -237,6 +237,8 @@ lwres_conf_init(lwres_context_t *ctx) {
87 confdata->resdebug = 0;
88 confdata->ndots = 1;
89 confdata->no_tld_query = 0;
90+ confdata->attempts = 0;
91+ confdata->timeout = 0;
92
93 for (i = 0; i < LWRES_CONFMAXNAMESERVERS; i++)
94 lwres_resetaddr(&confdata->nameservers[i]);
95@@ -289,6 +291,8 @@ lwres_conf_clear(lwres_context_t *ctx) {
96 confdata->resdebug = 0;
97 confdata->ndots = 1;
98 confdata->no_tld_query = 0;
99+ confdata->attempts = 0;
100+ confdata->timeout = 0;
101 }
102
103 static lwres_result_t
104@@ -530,6 +534,8 @@ static lwres_result_t
105 lwres_conf_parseoption(lwres_context_t *ctx, FILE *fp) {
106 int delim;
107 long ndots;
108+ long attempts;
109+ long timeout;
110 char *p;
111 char word[LWRES_CONFMAXLINELEN];
112 lwres_conf_t *confdata;
113@@ -546,6 +552,8 @@ lwres_conf_parseoption(lwres_context_t *
114 confdata->resdebug = 1;
115 } else if (strcmp("no_tld_query", word) == 0) {
116 confdata->no_tld_query = 1;
117+ } else if (strcmp("debug", word) == 0) {
118+ confdata->resdebug = 1;
119 } else if (strncmp("ndots:", word, 6) == 0) {
120 ndots = strtol(word + 6, &p, 10);
121 if (*p != '\0') /* Bad string. */
122@@ -553,6 +561,18 @@ lwres_conf_parseoption(lwres_context_t *
123 if (ndots < 0 || ndots > 0xff) /* Out of range. */
124 return (LWRES_R_FAILURE);
125 confdata->ndots = (lwres_uint8_t)ndots;
126+ } else if (strncmp("timeout:", word, 8) == 0) {
127+ timeout = strtol(word + 8, &p, 10);
128+ if (*p != '\0') /* Bad string. */
129+ return (LWRES_R_FAILURE);
130+ confdata->timeout = (lwres_int32_t)timeout;
131+ } else if (strncmp("attempts:", word, 9) == 0) {
132+ attempts = strtol(word + 9, &p, 10);
133+ if (*p != '\0') /* Bad string. */
134+ return (LWRES_R_FAILURE);
135+ if (attempts < 0) /* Out of range. */
136+ return (LWRES_R_FAILURE);
137+ confdata->attempts = (lwres_int32_t)attempts;
138 }
139
140 if (delim == EOF || delim == '\n')
141@@ -716,6 +736,12 @@ lwres_conf_print(lwres_context_t *ctx, F
142 if (confdata->no_tld_query)
143 fprintf(fp, "options no_tld_query\n");
144
145+ if (confdata->attempts)
146+ fprintf(fp, "options attempts:%d\n", confdata->attempts);
147+
148+ if (confdata->timeout)
149+ fprintf(fp, "options timeout:%d\n", confdata->timeout);
150+
151 return (LWRES_R_SUCCESS);
152 }
153