mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
1177. [func] Report view when loading zones if it is not a
standard view (_default or _bind). [RT #2270]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
1177. [func] Report view when loading zones if it is not a
|
||||||
|
standard view (_default or _bind). [RT #2270]
|
||||||
|
|
||||||
1176. [doc] Document that allow-v6-synthesis is only performed
|
1176. [doc] Document that allow-v6-synthesis is only performed
|
||||||
for clients that are supplied recursive service.
|
for clients that are supplied recursive service.
|
||||||
[RT #2260]
|
[RT #2260]
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: zone.c,v 1.357 2001/12/11 20:52:40 marka Exp $ */
|
/* $Id: zone.c,v 1.358 2002/01/15 06:42:15 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -4510,11 +4510,21 @@ zone_tostr(dns_zone_t *zone, char *buf, size_t length) {
|
|||||||
isc_buffer_init(&buffer, buf, length - 1);
|
isc_buffer_init(&buffer, buf, length - 1);
|
||||||
if (dns_name_dynamic(&zone->origin))
|
if (dns_name_dynamic(&zone->origin))
|
||||||
result = dns_name_totext(&zone->origin, ISC_TRUE, &buffer);
|
result = dns_name_totext(&zone->origin, ISC_TRUE, &buffer);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS &&
|
||||||
|
isc_buffer_availablelength(&buffer) >= (sizeof("<UNKNOWN>") - 1))
|
||||||
isc_buffer_putstr(&buffer, "<UNKNOWN>");
|
isc_buffer_putstr(&buffer, "<UNKNOWN>");
|
||||||
|
|
||||||
isc_buffer_putstr(&buffer, "/");
|
if (isc_buffer_availablelength(&buffer) > 0)
|
||||||
|
isc_buffer_putstr(&buffer, "/");
|
||||||
(void)dns_rdataclass_totext(zone->rdclass, &buffer);
|
(void)dns_rdataclass_totext(zone->rdclass, &buffer);
|
||||||
|
|
||||||
|
if (zone->view != NULL && strcmp(zone->view->name, "_bind") != 0 &&
|
||||||
|
strcmp(zone->view->name, "_default") != 0 &&
|
||||||
|
strlen(zone->view->name) < isc_buffer_availablelength(&buffer)) {
|
||||||
|
isc_buffer_putstr(&buffer, "/");
|
||||||
|
isc_buffer_putstr(&buffer, zone->view->name);
|
||||||
|
}
|
||||||
|
|
||||||
buf[isc_buffer_usedlength(&buffer)] = '\0';
|
buf[isc_buffer_usedlength(&buffer)] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user