Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 6e3f21ce1d62a9e7001f9d653bfca859 > files > 20

bind-9.3.6-20.P1.el5_8.5.src.rpm

diff -up bind-9.3.6-P1/bin/named/config.c.edns bind-9.3.6-P1/bin/named/config.c
--- bind-9.3.6-P1/bin/named/config.c.edns	2008-09-04 10:11:24.000000000 +0200
+++ bind-9.3.6-P1/bin/named/config.c	2009-02-23 15:00:20.000000000 +0100
@@ -126,6 +126,7 @@ options {\n\
 	check-names master fail;\n\
 	check-names slave warn;\n\
 	check-names response ignore;\n\
+	edns-enable yes;\n\
 	dnssec-enable no; /* Make yes for 9.4. */ \n\
 "
 
diff -up bind-9.3.6-P1/bin/named/query.c.edns bind-9.3.6-P1/bin/named/query.c
--- bind-9.3.6-P1/bin/named/query.c.edns	2008-10-16 00:30:47.000000000 +0200
+++ bind-9.3.6-P1/bin/named/query.c	2009-02-23 15:05:16.000000000 +0100
@@ -3608,6 +3608,12 @@ ns_query_start(ns_client_t *client) {
 	if (WANTDNSSEC(client) || want_ad)
 		message->flags |= DNS_MESSAGEFLAG_AD;
 
+	/*
+	 * Disable edns if an user require it.
+	 */
+	if (!client->view->enableedns)
+		client->query.fetchoptions |= DNS_FETCHOPT_NOEDNS0;
+
 	qclient = NULL;
 	ns_client_attach(client, &qclient);
 	query_find(qclient, NULL, qtype);
diff -up bind-9.3.6-P1/bin/named/server.c.edns bind-9.3.6-P1/bin/named/server.c
--- bind-9.3.6-P1/bin/named/server.c.edns	2009-02-23 15:00:20.000000000 +0100
+++ bind-9.3.6-P1/bin/named/server.c	2009-02-23 15:03:55.000000000 +0100
@@ -1213,6 +1213,11 @@ configure_view(dns_view_t *view, const c
 	view->provideixfr = cfg_obj_asboolean(obj);
 
 	obj = NULL;
+	(void)ns_config_get(maps, "edns-enable", &obj);
+	if (obj != NULL)
+		view->enableedns = cfg_obj_asboolean(obj);
+
+	obj = NULL;
 	result = ns_config_get(maps, "dnssec-enable", &obj);
 	INSIST(result == ISC_R_SUCCESS);
 	view->enablednssec = cfg_obj_asboolean(obj);
diff -up bind-9.3.6-P1/doc/misc/options.edns bind-9.3.6-P1/doc/misc/options
--- bind-9.3.6-P1/doc/misc/options.edns	2008-09-05 03:21:42.000000000 +0200
+++ bind-9.3.6-P1/doc/misc/options	2009-02-23 15:01:29.000000000 +0100
@@ -69,6 +69,7 @@ options {
         dialup <dialuptype>;
         directory <quoted_string>;
         disable-algorithms <string> { <string>; ... };
+	edns-enable <boolean>;
         dnssec-enable <boolean>;
         dnssec-lookaside <string> trust-anchor <string>;
         dnssec-must-be-secure <string> <boolean>;
@@ -202,6 +203,7 @@ view <string> <optional_class> {
         cleaning-interval <integer>;
         dialup <dialuptype>;
         disable-algorithms <string> { <string>; ... };
+	edns-enable <boolean>;
         dnssec-enable <boolean>;
         dnssec-lookaside <string> trust-anchor <string>;
         dnssec-must-be-secure <string> <boolean>;
diff -up bind-9.3.6-P1/lib/dns/include/dns/view.h.edns bind-9.3.6-P1/lib/dns/include/dns/view.h
--- bind-9.3.6-P1/lib/dns/include/dns/view.h.edns	2009-02-23 15:00:20.000000000 +0100
+++ bind-9.3.6-P1/lib/dns/include/dns/view.h	2009-02-23 15:00:20.000000000 +0100
@@ -109,6 +109,7 @@ struct dns_view {
 	isc_boolean_t			additionalfromauth;
 	isc_boolean_t			minimalresponses;
 	isc_boolean_t			enablednssec;
+	isc_boolean_t			enableedns;
 	dns_transfer_format_t		transfer_format;
 	dns_acl_t *			queryacl;
 	dns_acl_t *			recursionacl;
diff -up bind-9.3.6-P1/lib/dns/view.c.edns bind-9.3.6-P1/lib/dns/view.c
--- bind-9.3.6-P1/lib/dns/view.c.edns	2008-06-18 01:45:32.000000000 +0200
+++ bind-9.3.6-P1/lib/dns/view.c	2009-02-23 15:00:20.000000000 +0100
@@ -156,6 +156,7 @@ dns_view_create(isc_mem_t *mctx, dns_rda
 	view->additionalfromcache = ISC_TRUE;
 	view->additionalfromauth = ISC_TRUE;
 	view->enablednssec = ISC_TRUE;
+	view->enableedns = ISC_TRUE;
 	view->minimalresponses = ISC_FALSE;
 	view->transfer_format = dns_one_answer;
 	view->queryacl = NULL;
diff -up bind-9.3.6-P1/lib/isccfg/namedconf.c.edns bind-9.3.6-P1/lib/isccfg/namedconf.c
--- bind-9.3.6-P1/lib/isccfg/namedconf.c.edns	2009-02-23 15:00:20.000000000 +0100
+++ bind-9.3.6-P1/lib/isccfg/namedconf.c	2009-02-23 15:00:20.000000000 +0100
@@ -780,6 +780,7 @@ view_clauses[] = {
 	{ "root-delegation-only",  &cfg_type_optional_exclude, 0 },
 	{ "disable-algorithms", &cfg_type_disablealgorithm,
 	  CFG_CLAUSEFLAG_MULTI },
+	{ "edns-enable", &cfg_type_boolean, 0 },
 	{ "dnssec-enable", &cfg_type_boolean, 0 },
 	{ "dnssec-lookaside", &cfg_type_lookaside, CFG_CLAUSEFLAG_MULTI },
 	{ "dnssec-must-be-secure",  &cfg_type_mustbesecure,