[svn] commit: r3304 - /branches/trac331/src/lib/python/isc/datasrc/master.py

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Oct 21 07:50:20 UTC 2010


Author: shentingting
Date: Thu Oct 21 07:50:19 2010
New Revision: 3304

Log:
fix defect: loadzone honoring @ within RDATA in ticket 331

Modified:
    branches/trac331/src/lib/python/isc/datasrc/master.py

Modified: branches/trac331/src/lib/python/isc/datasrc/master.py
==============================================================================
--- branches/trac331/src/lib/python/isc/datasrc/master.py (original)
+++ branches/trac331/src/lib/python/isc/datasrc/master.py Thu Oct 21 07:50:19 2010
@@ -94,7 +94,7 @@
 name_regex = re.compile('[-\w\$\d\/*]+(?:\.[-\w\$\d\/]+)*\.?')
 def isname(s):
     global name_regex
-    if s == '.' or name_regex.match(s):
+    if s == '.' or s == '@' or name_regex.match(s):
         return True
     else:
         return False
@@ -240,9 +240,11 @@
     # yes , sets the relative domain name to the stated name
     #######################################################################
     def __statedname(self, name, record):
-        if name[-1] != '.':
+        if name[-1] != '.' or name == '@':
             if not self.__origin:
                 raise MasterFileError("Cannot parse RR, No $ORIGIN: " + record)
+            elif name == '@':
+                name = self.__origin
             elif self.__origin == '.':
                 name += '.'
             else:




More information about the bind10-changes mailing list