From 3a36d3d7e6a88a8f83c6c8735a96b2ca1c7d7713 Mon Sep 17 00:00:00 2001 From: Olafur Gudmundsson Date: Thu, 3 Feb 2000 19:03:59 +0000 Subject: [PATCH] Added code to reject lines beginning with $ that are not known Directives. Any name starting with $ should be escaped to comply with RFC1035. Effect any zone will stop loading at first error, message is printed if logging has been enabled. --- lib/dns/master.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/dns/master.c b/lib/dns/master.c index edc5552fc1..aaf751ce30 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -15,7 +15,7 @@ * SOFTWARE. */ - /* $Id: master.c,v 1.37 2000/02/02 00:36:34 gson Exp $ */ + /* $Id: master.c,v 1.38 2000/02/03 19:03:59 ogud Exp $ */ #include @@ -366,6 +366,15 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin, ttl_offset = current_time - dump_time; read_till_eol = ISC_TRUE; continue; + } else if (strncasecmp(token.value.as_pointer, + "$", 1) == 0) { + (callbacks->error)(callbacks, + "dns_master_load: %s %d " + "UNKOWN $ %s ", + isc_lex_getsourcename(lex), + isc_lex_getsourceline(lex), + token.value.as_pointer); + goto cleanup; } /*