]> granicus.if.org Git - pdns/commitdiff
after consultation with Gertjan Schoenmaker, export-etc-hosts-suffix has been tweaked...
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 1 Apr 2012 20:43:22 +0000 (20:43 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 1 Apr 2012 20:43:22 +0000 (20:43 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2545 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/docs/pdns.xml
pdns/reczones.cc

index 0ffc02d8e1801c5633c44e4457f203285d7c3e8c..d8767b0b75ddcb2a528c243b59d9922c7561ebae 100644 (file)
@@ -11779,6 +11779,22 @@ sql> insert into domainmetadata (domain_id, kind, content) values (7,'ALLOW-AXFR
              </para>
            </listitem>
          </varlistentry>
+         <varlistentry>
+           <term>export-etc-hosts-suffix</term>
+           <listitem>
+             <para>
+               If set, all hostnames in the export-etc-hosts file are
+               loaded in canonical form, based on this suffix, unless the
+               name contain a '.', in which case the name is unchanged. 
+               So an entry called 'pc' with
+               export-etc-hosts-suffix='home.com' will lead to the
+               generation of 'pc.home.com' within the recursor.  An entry
+               called 'server1.home' will be stored as 'server1.home',
+               regardless of the export-etc-hosts setting. Available
+               in since 3.4.
+             </para>
+           </listitem>
+         </varlistentry>
 
          <varlistentry>
            <term>fork</term>
index 3ab2312dc692ba08ba1384878536c31f7f2bada7..fb1ba0cbda52e6407b6305e4d4dcd93e4e8836d7 100644 (file)
@@ -404,8 +404,9 @@ SyncRes::domainmap_t* parseAuthAndForwards()
          continue;
        
        for(unsigned int n=1; n < parts.size(); ++n) {
-         makeNameToIPZone(newMap, parts[n], parts[0]);
-         if(!searchSuffix.empty()) {
+         if(searchSuffix.empty() || parts[n].find('.') != string::npos)
+           makeNameToIPZone(newMap, parts[n], parts[0]);
+         else {
            string canonic=toCanonic(searchSuffix, parts[n]);
            if(canonic != parts[n]) {
              makeNameToIPZone(newMap, canonic, parts[0]);