From 0a39945afb11a7ee9bcd5cdb37a056884081421c Mon Sep 17 00:00:00 2001 From: rdujardin Date: Fri, 22 Jul 2016 16:49:34 +0200 Subject: [PATCH] Fix bug in ipv6 reverse dns --- netbox/ipam/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/ipam/models.py b/netbox/ipam/models.py index a72b9eeb6..7ee53ad4a 100644 --- a/netbox/ipam/models.py +++ b/netbox/ipam/models.py @@ -373,7 +373,7 @@ class Prefix(CreatedUpdatedModel): zones[zone_id] += (ibytes[3]+'.'+ibytes[2]).ljust(7) + ' IN PTR ' + ip.hostname.ljust(40) + ' ; ' + ip.description.ljust(20) + ' ; gen by netbox ( '+time.strftime('%A %B %d %Y %H:%M:%S',time.localtime())+' ) \n' else: - pfull = str(ipaddress.IPv6Address(str(self.prefix).split('/')[0]).exploded) + pfull = str(ipaddress.IPv6Address(unicode(str(self.prefix).split('/')[0])).exploded) pnibbles = pfull.split(':') pdigits = pfull.replace(':','') pslash = int(str(self.prefix).split('/')[1])