[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [ascension] 14/45: reworked the incremental zone transfer,
From: |
gnunet |
Subject: |
[GNUnet-SVN] [ascension] 14/45: reworked the incremental zone transfer, added notice for bind |
Date: |
Fri, 25 Jan 2019 10:02:14 +0100 |
This is an automated email from the git hooks/post-receive script.
rexxnor pushed a commit to branch master
in repository ascension.
commit 2829a7614d724fb1e2f01f81d9afd0661dd2e553
Author: rexxnor <address@hidden>
AuthorDate: Fri Sep 28 15:05:35 2018 +0200
reworked the incremental zone transfer, added notice for bind
---
gnsmigrator/gnsmigrator.py | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/gnsmigrator/gnsmigrator.py b/gnsmigrator/gnsmigrator.py
index 80881e3..5b4d2e7 100644
--- a/gnsmigrator/gnsmigrator.py
+++ b/gnsmigrator/gnsmigrator.py
@@ -216,8 +216,6 @@ class GNSMigrator():
"""
Refresh the zone using IXFR and the previous serial as reference
- Returns 0 on unchanged and 1 on changed
-
:param domain: The domain to transfer and migrate
:param zonetuple: The necessary data tuple for the transfer
:param dnsresolver: Optional user specified resolver for subdomains
@@ -229,20 +227,26 @@ class GNSMigrator():
# Ugly way to get serial
oldserial = int(str(zone.get_rdataset('@', dns.rdatatype.SOA)).split('
')[5])
+
+ # A normal BIND9 returns a normal AXFR response with the entire zone
+ # if the serial is newer. This is why there is no real incremental
+ # zone transfer using bind. This makes the merger_zones function
+ # unnecessary. Furthermore this try except block updates only if
+ # there is a newer zone availible (according to serial). The IXFR
+ # returns only a SOA record with a new serial if it has not changed
try:
newzone = dns.zone.from_xfr(dns.query.xfr(xfrinfo[0],
xfrinfo[1],
rdtype=dns.rdatatype.IXFR,
serial=oldserial))
+ cls.zones[domain] = (newzone, (xfrinfo[0],
+ xfrinfo[1],
+ zone.get_rdataset('@',
dns.rdatatype.SOA).ttl))
except dns.zone.NoNS:
print('the zone for domain %s was not updated' % domain)
# Merge old and new zone
- updatedzone = cls.merge_zones(domain, zone, newzone)
- cls.zones[domain] = (updatedzone, (xfrinfo[0],
- xfrinfo[1],
- zone.get_rdataset('@',
dns.rdatatype.SOA).ttl))
-
+ # updatedzone = cls.merge_zones(domain, zone, newzone)
def main():
"""
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [ascension] branch master created (now 5ea0f07), gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 04/45: Merge branch 'master' of gitlab.ti.bfh.ch:gerbp6/gnsmigrator, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 01/45: added gitignore and README, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 07/45: fixes, added a few tests, updated README and requirements, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 14/45: reworked the incremental zone transfer, added notice for bind,
gnunet <=
- [GNUnet-SVN] [ascension] 11/45: added ttl of SOA to zone for later implementation of timer, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 09/45: updated README, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 23/45: fixed non existing file, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 19/45: fixed some minor bugs, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 16/45: fixed special cases with GNS2DNS, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 25/45: fixed bugs, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 20/45: fixed zonemaster to zonedata in README, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 13/45: added zone merging of full and incremental zones, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 05/45: initial prototype, bootstrapping zones and zone transfer, gnunet, 2019/01/25
- [GNUnet-SVN] [ascension] 17/45: updated requirements and README, gnunet, 2019/01/25