Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-dnslib for openSUSE:Factory 
checked in at 2021-08-18 08:56:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-dnslib (Old)
 and      /work/SRC/openSUSE:Factory/.python-dnslib.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-dnslib"

Wed Aug 18 08:56:23 2021 rev:2 rq:912720 version:0.9.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-dnslib/python-dnslib.changes      
2020-08-29 20:41:21.617440359 +0200
+++ /work/SRC/openSUSE:Factory/.python-dnslib.new.1899/python-dnslib.changes    
2021-08-18 08:57:14.790880752 +0200
@@ -1,0 +2,11 @@
+Tue Aug 17 11:46:14 UTC 2021 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Update to v0.9.16
+  * Add DNAME
+  * Add support for all RR types to NSEC type bitmap
+  * Issue 16: uncaught exceptions leak open sockets
+- from v0.9.15
+  * DNSServer fixes / Add unsupported RR types
+  * Add NULL QTYPE
+
+-------------------------------------------------------------------

Old:
----
  dnslib-0.9.14.tar.gz

New:
----
  dnslib-0.9.16.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-dnslib.spec ++++++
--- /var/tmp/diff_new_pack.8lE3ug/_old  2021-08-18 08:57:15.274880182 +0200
+++ /var/tmp/diff_new_pack.8lE3ug/_new  2021-08-18 08:57:15.278880178 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-dnslib
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-dnslib
-Version:        0.9.14
+Version:        0.9.16
 Release:        0
 Summary:        Simple library to encode/decode DNS wire-format packets
 License:        BSD-2-Clause

++++++ dnslib-0.9.14.tar.gz -> dnslib-0.9.16.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dnslib-0.9.14/PKG-INFO new/dnslib-0.9.16/PKG-INFO
--- old/dnslib-0.9.14/PKG-INFO  2020-06-09 10:17:46.238147000 +0200
+++ new/dnslib-0.9.16/PKG-INFO  2021-05-07 18:16:39.721066200 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: dnslib
-Version: 0.9.14
+Version: 0.9.16
 Summary: Simple library to encode/decode DNS wire-format packets
 Home-page: https://github.com/paulc/dnslib
 Author: PaulC
@@ -357,6 +357,13 @@
                                  Merged Pull Request #4 (Extra options for 
intercept.py) - thanks to @nolanl
          *   0.9.14  2020-06-09  Merged Pull Request #10 (Return doctest 
status via exit code)
                                  Thanks to @mgorny
+         *   0.9.15  2021-05-07  DNSServer fixes - support IPv6 (from Pull 
Request #21) - thanks to @mikma
+                                                 - deamon threads (Pull 
Request #19) - thanks to @wojons
+                                 Add unsupported RR types (Issue #27)
+         *   0.9.16  2021-05-07  Merge pull request #23 from Tugzrida/patch-1
+                                    Add support for all RR types to NSEC type 
bitmap
+                                 Merge pull request #17 from sunds/issue_16
+                                    Issue 16: uncaught exceptions leak open 
sockets
         
         License:
         --------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dnslib-0.9.14/README new/dnslib-0.9.16/README
--- old/dnslib-0.9.14/README    2020-06-09 10:01:28.000000000 +0200
+++ new/dnslib-0.9.16/README    2021-05-07 18:08:47.000000000 +0200
@@ -350,6 +350,13 @@
                          Merged Pull Request #4 (Extra options for 
intercept.py) - thanks to @nolanl
  *   0.9.14  2020-06-09  Merged Pull Request #10 (Return doctest status via 
exit code)
                          Thanks to @mgorny
+ *   0.9.15  2021-05-07  DNSServer fixes - support IPv6 (from Pull Request 
#21) - thanks to @mikma
+                                         - deamon threads (Pull Request #19) - 
thanks to @wojons
+                         Add unsupported RR types (Issue #27)
+ *   0.9.16  2021-05-07  Merge pull request #23 from Tugzrida/patch-1
+                            Add support for all RR types to NSEC type bitmap
+                         Merge pull request #17 from sunds/issue_16
+                            Issue 16: uncaught exceptions leak open sockets
 
 License:
 --------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dnslib-0.9.14/dnslib/__init__.py 
new/dnslib-0.9.16/dnslib/__init__.py
--- old/dnslib-0.9.14/dnslib/__init__.py        2020-06-09 10:01:28.000000000 
+0200
+++ new/dnslib-0.9.16/dnslib/__init__.py        2021-05-07 18:08:33.000000000 
+0200
@@ -352,6 +352,13 @@
                          Merged Pull Request #4 (Extra options for 
intercept.py) - thanks to @nolanl
  *   0.9.14  2020-06-09  Merged Pull Request #10 (Return doctest status via 
exit code)
                          Thanks to @mgorny
+ *   0.9.15  2021-05-07  DNSServer fixes - support IPv6 (from Pull Request 
#21) - thanks to @mikma
+                                         - deamon threads (Pull Request #19) - 
thanks to @wojons
+                         Add unsupported RR types (Issue #27)
+ *   0.9.16  2021-05-07  Merge pull request #23 from Tugzrida/patch-1
+                            Add support for all RR types to NSEC type bitmap
+                         Merge pull request #17 from sunds/issue_16
+                            Issue 16: uncaught exceptions leak open sockets
 
 License:
 --------
@@ -374,7 +381,7 @@
 
 from dnslib.dns import *
 
-version = "0.9.14"
+version = "0.9.16"
 
 if __name__ == '__main__':
     import doctest,sys,textwrap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dnslib-0.9.14/dnslib/dns.py 
new/dnslib-0.9.16/dnslib/dns.py
--- old/dnslib-0.9.14/dnslib/dns.py     2020-06-09 10:01:28.000000000 +0200
+++ new/dnslib-0.9.16/dnslib/dns.py     2021-05-07 18:06:41.000000000 +0200
@@ -31,16 +31,17 @@
 # DNS codes
 
 QTYPE =  Bimap('QTYPE',
-                {1:'A', 2:'NS', 5:'CNAME', 6:'SOA', 12:'PTR', 13:'HINFO',
+        {1:'A', 2:'NS', 5:'CNAME', 6:'SOA', 10:'NULL', 12:'PTR', 13:'HINFO',
                     15:'MX', 16:'TXT', 17:'RP', 18:'AFSDB', 24:'SIG', 25:'KEY',
                     28:'AAAA', 29:'LOC', 33:'SRV', 35:'NAPTR', 36:'KX',
                     37:'CERT', 38:'A6', 39:'DNAME', 41:'OPT', 42:'APL',
                     43:'DS', 44:'SSHFP', 45:'IPSECKEY', 46:'RRSIG', 47:'NSEC',
                     48:'DNSKEY', 49:'DHCID', 50:'NSEC3', 51:'NSEC3PARAM',
-                    52:'TLSA', 55:'HIP', 59:'CDS', 60:'CDNSKEY',
-                    61:'OPENPGPKEY',99:'SPF', 249:'TKEY', 250:'TSIG',
-                    251:'IXFR', 252:'AXFR', 255:'ANY', 256:'URI', 257:'CAA',
-                    32768:'TA', 32769:'DLV'}, DNSError)
+                    52:'TLSA', 53:'HIP', 55:'HIP', 59:'CDS', 60:'CDNSKEY',
+                    61:'OPENPGPKEY', 62:'CSYNC', 63:'ZONEMD', 64:'SVCB',
+                    65:'HTTPS', 99:'SPF', 108:'EUI48', 109:'EUI64', 249:'TKEY',
+                    250:'TSIG', 251:'IXFR', 252:'AXFR', 255:'ANY', 256:'URI',
+                    257:'CAA', 32768:'TA', 32769:'DLV'}, DNSError)
 
 CLASS =  Bimap('CLASS',
                 {1:'IN', 2:'CS', 3:'CH', 4:'Hesiod', 254:'None', 255:'*'},
@@ -355,28 +356,32 @@
             inet = socket.AF_INET6
         else:
             inet = socket.AF_INET
-        if tcp:
-            if len(data) > 65535:
-                raise ValueError("Packet length too long: %d" % len(data))
-            data = struct.pack("!H",len(data)) + data
-            sock = socket.socket(inet,socket.SOCK_STREAM)
-            if timeout is not None:
-                sock.settimeout(timeout)
-            sock.connect((dest,port))
-            sock.sendall(data)
-            response = sock.recv(8192)
-            length = struct.unpack("!H",bytes(response[:2]))[0]
-            while len(response) - 2 < length:
-                response += sock.recv(8192)
-            sock.close()
-            response = response[2:]
-        else:
-            sock = socket.socket(inet,socket.SOCK_DGRAM)
-            if timeout is not None:
-                sock.settimeout(timeout)
-            sock.sendto(self.pack(),(dest,port))
-            response,server = sock.recvfrom(8192)
-            sock.close()
+        try:
+            sock = None
+            if tcp:
+                if len(data) > 65535:
+                     raise ValueError("Packet length too long: %d" % len(data))
+                data = struct.pack("!H",len(data)) + data
+                sock = socket.socket(inet,socket.SOCK_STREAM)
+                if timeout is not None:
+                    sock.settimeout(timeout)
+                sock.connect((dest,port))
+                sock.sendall(data)
+                response = sock.recv(8192)
+                length = struct.unpack("!H",bytes(response[:2]))[0]
+                while len(response) - 2 < length:
+                    response += sock.recv(8192)
+                response = response[2:]
+            else:
+                sock = socket.socket(inet,socket.SOCK_DGRAM)
+                if timeout is not None:
+                    sock.settimeout(timeout)
+                sock.sendto(self.pack(),(dest,port))
+                response,server = sock.recvfrom(8192)
+        finally:
+            if (sock is not None):
+                sock.close()
+
         return response
 
     def format(self,prefix="",sort=False):
@@ -1324,6 +1329,9 @@
 class NS(CNAME):
     pass
 
+class DNAME(CNAME):
+    pass
+
 class SOA(RD):
 
     times = ntuple_range('times',5,0,4294967295)
@@ -1621,23 +1629,35 @@
 def encode_type_bitmap(rrlist):
     """
         Encode RR type bitmap in NSEC record
-        XXX Currenly support window #0 (RR 1-255)
 
         >>> p = lambda x: print(binascii.hexlify(x).decode())
         >>> p(encode_type_bitmap(['A','TXT','AAAA','RRSIG','NSEC']))
         0006400080080003
         >>> 
p(encode_type_bitmap(['A','NS','SOA','TXT','AAAA','RRSIG','NSEC','DNSKEY']))
         000762008008000380
+        >>> p(encode_type_bitmap(['A','ANY','URI','CAA','TA','DLV']))
+        
002040000000000000000000000000000000000000000000000000000000000000010101c08001c0
     """
-    bitmap = bytearray([0]*32)
-    for rr in rrlist:
-        v = getattr(QTYPE,rr)
-        if v > 255:
-            raise ValueError("Only support window #0 (RR 1-255) [%s]" % rr)
+    rrlist = sorted([getattr(QTYPE,rr) for rr in rrlist])
+    buf = DNSBuffer()
+    curWindow = rrlist[0]//256
+    bitmap = bytearray(32)
+    n = len(rrlist)-1
+    for i, rr in enumerate(rrlist):
+        v = rr - curWindow*256
         bitmap[v//8] |= 1 << (7 - v%8)
-    while bitmap[-1] == 0:
-        bitmap = bitmap[:-1]
-    return struct.pack("BB",0,len(bitmap)) + bitmap
+
+        if i == n or rrlist[i+1] >= (curWindow+1)*256:
+            while bitmap[-1] == 0:
+                bitmap = bitmap[:-1]
+            buf.pack("BB", curWindow, len(bitmap))
+            buf.append(bitmap)
+
+            if i != n:
+                curWindow = rrlist[i+1]//256
+                bitmap = bytearray(32)
+
+    return buf.data
 
 class NSEC(RD):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dnslib-0.9.14/dnslib/label.py 
new/dnslib-0.9.16/dnslib/label.py
--- old/dnslib-0.9.14/dnslib/label.py   2020-06-09 10:01:28.000000000 +0200
+++ new/dnslib-0.9.16/dnslib/label.py   2021-05-07 17:46:56.000000000 +0200
@@ -143,7 +143,7 @@
         return "<DNSLabel: '%s'>" % str(self)
 
     def __hash__(self):
-        return hash(self.label)
+        return hash(tuple(map(lambda x:x.lower(),self.label)))
 
     def __ne__(self,other):
         return not self == other
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dnslib-0.9.14/dnslib/proxy.py 
new/dnslib-0.9.16/dnslib/proxy.py
--- old/dnslib-0.9.14/dnslib/proxy.py   2020-05-31 16:36:32.000000000 +0200
+++ new/dnslib-0.9.16/dnslib/proxy.py   2021-05-07 18:06:41.000000000 +0200
@@ -79,25 +79,33 @@
         Helper function to send/receive DNS TCP request
         (in/out packets will have prepended TCP length header)
     """
-    sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
-    sock.connect((host,port))
-    sock.sendall(data)
-    response = sock.recv(8192)
-    length = struct.unpack("!H",bytes(response[:2]))[0]
-    while len(response) - 2 < length:
-        response += sock.recv(8192)
-    sock.close()
-    return response
+    sock = None
+    try:
+        sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+        sock.connect((host,port))
+        sock.sendall(data)
+        response = sock.recv(8192)
+        length = struct.unpack("!H",bytes(response[:2]))[0]
+        while len(response) - 2 < length:
+            response += sock.recv(8192)
+        return response
+    finally:
+        if (sock is not None):
+            sock.close()
 
 def send_udp(data,host,port):
     """
         Helper function to send/receive DNS UDP request
     """
-    sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
-    sock.sendto(data,(host,port))
-    response,server = sock.recvfrom(8192)
-    sock.close()
-    return response
+    sock = None
+    try:
+        sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
+        sock.sendto(data,(host,port))
+        response,server = sock.recvfrom(8192)
+        return response
+    finally:
+        if (sock is not None):
+            sock.close()
 
 if __name__ == '__main__':
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dnslib-0.9.14/dnslib/server.py 
new/dnslib-0.9.16/dnslib/server.py
--- old/dnslib-0.9.14/dnslib/server.py  2020-06-09 10:01:28.000000000 +0200
+++ new/dnslib-0.9.16/dnslib/server.py  2021-05-07 17:20:19.000000000 +0200
@@ -302,11 +302,21 @@
         print("\n",dnsobj.toZone("    "),"\n",sep="")
 
 
-class UDPServer(socketserver.ThreadingMixIn,socketserver.UDPServer):
-    allow_reuse_address = True
+class UDPServer(socketserver.UDPServer,socketserver.ThreadingMixIn,object):
+    def __init__(self, server_address, handler):
+        self.allow_reuse_address = True
+        self.daemon_threads = True
+        if server_address[0] != '' and ':' in server_address[0]:
+            self.address_family = socket.AF_INET6
+        super(UDPServer,self).__init__(server_address, handler)
 
-class TCPServer(socketserver.ThreadingMixIn,socketserver.TCPServer):
-    allow_reuse_address = True
+class TCPServer(socketserver.TCPServer,socketserver.ThreadingMixIn,object):
+    def __init__(self, server_address, handler):
+        self.allow_reuse_address = True
+        self.daemon_threads = True
+        if server_address[0] != '' and ':' in server_address[0]:
+            self.address_family = socket.AF_INET6
+        super(TCPServer,self).__init__(server_address, handler)
 
 class DNSServer(object):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dnslib-0.9.14/dnslib.egg-info/PKG-INFO 
new/dnslib-0.9.16/dnslib.egg-info/PKG-INFO
--- old/dnslib-0.9.14/dnslib.egg-info/PKG-INFO  2020-06-09 10:17:45.000000000 
+0200
+++ new/dnslib-0.9.16/dnslib.egg-info/PKG-INFO  2021-05-07 18:16:39.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: dnslib
-Version: 0.9.14
+Version: 0.9.16
 Summary: Simple library to encode/decode DNS wire-format packets
 Home-page: https://github.com/paulc/dnslib
 Author: PaulC
@@ -357,6 +357,13 @@
                                  Merged Pull Request #4 (Extra options for 
intercept.py) - thanks to @nolanl
          *   0.9.14  2020-06-09  Merged Pull Request #10 (Return doctest 
status via exit code)
                                  Thanks to @mgorny
+         *   0.9.15  2021-05-07  DNSServer fixes - support IPv6 (from Pull 
Request #21) - thanks to @mikma
+                                                 - deamon threads (Pull 
Request #19) - thanks to @wojons
+                                 Add unsupported RR types (Issue #27)
+         *   0.9.16  2021-05-07  Merge pull request #23 from Tugzrida/patch-1
+                                    Add support for all RR types to NSEC type 
bitmap
+                                 Merge pull request #17 from sunds/issue_16
+                                    Issue 16: uncaught exceptions leak open 
sockets
         
         License:
         --------

Reply via email to