From 11dbb6dc6b32c6316cb40c767701a24cfbc18326 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 11 Dec 2001 23:53:13 +0000 Subject: [PATCH] silently reject MD and MF updates. --- bin/named/update.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bin/named/update.c b/bin/named/update.c index 27ef58ef7f..9c0135ca5b 100644 --- a/bin/named/update.c +++ b/bin/named/update.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: update.c,v 1.91 2001/11/30 01:58:50 gson Exp $ */ +/* $Id: update.c,v 1.92 2001/12/11 23:53:13 marka Exp $ */ #include @@ -2278,6 +2278,20 @@ update_action(isc_task_t *task, isc_event_t *event) { &name, &rdata, &covers, &ttl, &update_class); if (update_class == zoneclass) { + + /* + * RFC 1123 doesn't allow MF and MD in master zones. */ + if (rdata.type == dns_rdatatype_md || + rdata.type == dns_rdatatype_mf) { + char typebuf[DNS_RDATATYPE_FORMATSIZE]; + + dns_rdatatype_format(rdata.type, typebuf, + sizeof(typebuf)); + update_log(client, zone, LOGLEVEL_PROTOCOL, + "attempt to add %s ignored", + typebuf); + continue; + } if (rdata.type == dns_rdatatype_cname) { CHECK(cname_incompatible_rrset_exists(db, ver, name,