From 775acd9eb1cc068339c69a47bff021b74ab6e98c Mon Sep 17 00:00:00 2001 From: bert hubert Date: Fri, 24 May 2013 16:00:44 +0200 Subject: [PATCH] give a better error on trying to add nsec3 parameters to a weird zone like "1 0 1 ab" (which indicates that you forgot to specify a zone name on the command line). Fixes #800. --- pdns/pdnssec.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index d218bbf2c..dfbb32a6f 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -1207,7 +1207,14 @@ try string nsec3params = cmds.size() > 2 ? cmds[2] : "1 0 1 ab"; bool narrow = cmds.size() > 3 && cmds[3]=="narrow"; NSEC3PARAMRecordContent ns3pr(nsec3params); - dk.setNSEC3PARAM(cmds[1], ns3pr, narrow); + + string zone=cmds[1]; + if(!dk.isSecuredZone(zone)) { + cerr<<"Zone '"<