[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [ascension] branch master updated: fixed a few bugs and pre
From: |
gnunet |
Subject: |
[GNUnet-SVN] [ascension] branch master updated: fixed a few bugs and prepared root migration |
Date: |
Sat, 22 Jun 2019 02:08:49 +0200 |
This is an automated email from the git hooks/post-receive script.
rexxnor pushed a commit to branch master
in repository ascension.
The following commit(s) were added to refs/heads/master by this push:
new c11712c fixed a few bugs and prepared root migration
c11712c is described below
commit c11712c96c7e66bf21c24691f5c05cc80e1e7f53
Author: rexxnor <address@hidden>
AuthorDate: Sat Jun 22 02:07:22 2019 +0200
fixed a few bugs and prepared root migration
---
ascension/ascension.py | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/ascension/ascension.py b/ascension/ascension.py
index 39d5963..31f0bc8 100644
--- a/ascension/ascension.py
+++ b/ascension/ascension.py
@@ -92,6 +92,9 @@ class Ascender():
flags: str,
minimum: str) -> None:
self.domain = domain
+ # special case for root zone
+ if domain[-1] == '.' and len(domain) == 1:
+ self.domain = '@'
if domain[-1] == '.':
self.domain = self.domain[:-1]
self.port = int(port)
@@ -140,7 +143,8 @@ class Ascender():
:returns: Serial of the zones SOA record
"""
# Makes domains better resolvable
- domain = domain + "."
+ if not domain == "@":
+ domain = domain + "."
# SOA is different if taken directly from SOA record
# compared to AXFR/IXFR - changed to respect this
try:
@@ -353,7 +357,7 @@ class Ascender():
'-z', zonename,
'-n', str(label),
] + recordline,
- )
+ )
if ret.returncode != 0:
logging.warning("failed adding record with name %s",
@@ -505,7 +509,8 @@ class Ascender():
'-D',
'-z', self.domain,
'-t', 'SOA',
- '-n', '@'])
+ '-n', '@'],
+ stderr=sp.DEVNULL)
serial = serial.decode()
except sp.CalledProcessError:
serial = ""
@@ -652,18 +657,6 @@ class Ascender():
zonename, _, pkey, _, privkey = zone.split(" ")
self.subzonedict[zonename] = (pkey, self.minimum, privkey)
- # Create missing zones (and add to dict) for GNS zones that are NOT
DNS zones
- # ("." is not a zone-cut in DNS, but always in GNS).
- for name in self.zone.nodes.keys():
- subzones = str(name).split('.')
- for i in range(1, len(subzones)):
- subdomain = ".".join(subzones[i:])
- zonename = "%s.%s" % (subdomain, self.domain)
- ttl = self.minimum # new record, cannot use existing one
- if self.subzonedict.get(zonename) is None:
- pkey, privkey = self.create_zone_and_get_pkey(zonename)
- self.subzonedict[zonename] = (pkey, ttl, privkey)
-
# Check if a delegated zone is available in GNS as per NS record
# Adds NS records that contain "gns--pkey--" to dictionary
nsrecords = self.zone.iterate_rdatasets(dns.rdatatype.NS)
@@ -700,6 +693,19 @@ class Ascender():
logging.critical("PKEY in DNS does not match PKEY in GNS
for name %s", name)
continue
+ # Create missing zones (and add to dict) for GNS zones that are NOT
DNS zones
+ # ("." is not a zone-cut in DNS, but always in GNS).
+ for name in self.zone.nodes.keys():
+ subzones = str(name).split('.')
+ for i in range(1, len(subzones)):
+ subdomain = ".".join(subzones[i:])
+ zonename = "%s.%s" % (subdomain, self.domain)
+ ttl = self.minimum # new record, cannot use existing one
+ if self.subzonedict.get(zonename) is None:
+ pkey, privkey = self.create_zone_and_get_pkey(zonename)
+ self.subzonedict[zonename] = (pkey, ttl, privkey)
+
+
# Generate PKEY records for all entries in subzonedict
for zone, pkeyttltuple in self.subzonedict.items():
pkey, ttl, _ = pkeyttltuple
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [ascension] branch master updated: fixed a few bugs and prepared root migration,
gnunet <=