]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
saxfr: fix next owner name hiding
authorKees Monshouwer <mind04@monshouwer.org>
Sun, 23 Feb 2014 18:41:05 +0000 (19:41 +0100)
committermind04 <mind04@monshouwer.org>
Sun, 23 Feb 2014 18:47:15 +0000 (19:47 +0100)
pdns/saxfr.cc

index 53f01085292abc3843aac923450fef1d88cbf100..4bcdfdb09e207cf5ec9354c4de9a78388c540dd5 100644 (file)
@@ -94,12 +94,17 @@ try
         stringtok(parts, zoneRep);
         o<<"\t"<<i->first.d_ttl<<"\t"<< parts[0]<<" "<<parts[1]<<" "<<parts[2]<<" "<<parts[3]<<" [expiry] [inception] [keytag] "<<parts[7]<<" ...";
       }
-      else if(!showflags && i->first.d_type == QType::NSEC3)
+      else if(i->first.d_type == QType::NSEC3)
       {
         string zoneRep = i->first.d_content->getZoneRepresentation();
         vector<string> parts;
         stringtok(parts, zoneRep);
-        o<<"\t"<<i->first.d_ttl<<"\t"<< parts[0]<<" [flags] "<<parts[2]<<" "<<parts[3]<<" "<<"[next owner]";
+        o<<"\t"<<i->first.d_ttl<<"\t"<<parts[0]<<" ";
+        if (showflags)
+          o<<parts[1];
+        else
+          o<<"[flags]";
+        o<<" "<<parts[2]<<" "<<parts[3]<<" "<<"[next owner]";
         for(vector<string>::iterator iter = parts.begin()+5; iter != parts.end(); ++iter)
           o<<" "<<*iter;
       }