-2034. [bug] gcc: set -fno-strict-aliasing. [RT #16124]
+2036. [bug] 'rndc recursing' could cause trigger a REQUIRE.
+ [RT #16075]
+2034. [bug] gcc: set -fno-strict-aliasing. [RT #16124]
--- 9.3.3b1 released ---
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: client.c,v 1.176.2.13.4.28 2006/01/04 23:50:19 marka Exp $ */
+/* $Id: client.c,v 1.176.2.13.4.29 2006/06/05 00:15:17 marka Exp $ */
#include <config.h>
}
/*
* I/O cancel is complete. Burn down all state
- * related to the current request.
+ * related to the current request. Ensure that
+ * the client is on the active list and not the
+ * recursing list.
*/
+ LOCK(&client->manager->lock);
+ if (client->list == &client->manager->recursing) {
+ ISC_LIST_UNLINK(*client->list, client, link);
+ ISC_LIST_APPEND(client->manager->active, client, link);
+ client->list = &client->manager->active;
+ }
+ UNLOCK(&client->manager->lock);
ns_client_endrequest(client);
client->state = NS_CLIENTSTATE_READING;
}
UNLOCK(&manager->lock);
}
+
+void
+ns_client_qnamereplace(ns_client_t *client, dns_name_t *name) {
+
+ if (client->manager != NULL)
+ LOCK(&client->manager->lock);
+ if (client->query.restarts > 0) {
+ /*
+ * client->query.qname was dynamically allocated.
+ */
+ dns_message_puttempname(client->message,
+ &client->query.qname);
+ }
+ client->query.qname = name;
+ if (client->manager != NULL)
+ UNLOCK(&client->manager->lock);
+}
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: client.h,v 1.60.2.2.10.10 2005/07/29 00:13:08 marka Exp $ */
+/* $Id: client.h,v 1.60.2.2.10.11 2006/06/05 00:15:18 marka Exp $ */
#ifndef NAMED_CLIENT_H
#define NAMED_CLIENT_H 1
* return no response to the client.
*/
+void
+ns_client_qnamereplace(ns_client_t *client, dns_name_t *name);
+/*%
+ * Replace the qname.
+ */
+
isc_boolean_t
ns_client_shuttingdown(ns_client_t *client);
/*
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: query.c,v 1.198.2.13.4.41 2006/05/18 03:15:46 marka Exp $ */
+/* $Id: query.c,v 1.198.2.13.4.42 2006/06/05 00:15:17 marka Exp $ */
#include <config.h>
ns_client_next(client, result);
}
-static inline void
-query_maybeputqname(ns_client_t *client) {
- if (client->query.restarts > 0) {
- /*
- * client->query.qname was dynamically allocated.
- */
- dns_message_puttempname(client->message,
- &client->query.qname);
- client->query.qname = NULL;
- }
-}
-
static inline void
query_freefreeversions(ns_client_t *client, isc_boolean_t everything) {
ns_dbversion_t *dbversion, *dbversion_next;
}
}
- query_maybeputqname(client);
-
+ if (client->query.restarts > 0) {
+ /*
+ * client->query.qname was dynamically allocated.
+ */
+ dns_message_puttempname(client->message,
+ &client->query.qname);
+ }
+ client->query.qname = NULL;
client->query.attributes = (NS_QUERYATTR_RECURSIONOK |
NS_QUERYATTR_CACHEOK |
NS_QUERYATTR_SECURE);
goto cleanup;
}
dns_rdata_freestruct(&cname);
- query_maybeputqname(client);
- client->query.qname = tname;
+ ns_client_qnamereplace(client, tname);
want_restart = ISC_TRUE;
if (!WANTRECURSION(client))
options |= DNS_GETDB_NOLOG;
/*
* Switch to the new qname and restart.
*/
- query_maybeputqname(client);
- client->query.qname = fname;
+ ns_client_qnamereplace(client, fname);
fname = NULL;
want_restart = ISC_TRUE;
if (!WANTRECURSION(client))