From: Libor Peltan Date: Tue, 19 Nov 2019 15:29:35 +0000 (+0100) Subject: bugfix/updates: infinite recursion when changing SOA TTL X-Git-Tag: embedded_lmdb~108^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ea63d1c3dc43a944f7abe2df2b1b033799eb472;p=thirdparty%2Fknot-dns.git bugfix/updates: infinite recursion when changing SOA TTL --- diff --git a/src/knot/updates/zone-update.c b/src/knot/updates/zone-update.c index c893780359..c768489163 100644 --- a/src/knot/updates/zone-update.c +++ b/src/knot/updates/zone-update.c @@ -402,7 +402,7 @@ void zone_update_clear(zone_update_t *update) static int solve_add_different_ttl(zone_update_t *update, const knot_rrset_t *add) { - if (add->type == KNOT_RRTYPE_RRSIG) { + if (add->type == KNOT_RRTYPE_RRSIG || add->type == KNOT_RRTYPE_SOA) { return KNOT_EOK; } diff --git a/tests-extra/tests/ddns/basic/test.py b/tests-extra/tests/ddns/basic/test.py index 5764ac4089..51b51337fe 100644 --- a/tests-extra/tests/ddns/basic/test.py +++ b/tests-extra/tests/ddns/basic/test.py @@ -320,6 +320,17 @@ def do_normal_tests(master, zone, dnssec=False): rdata="dns1.ddns. hostmaster.ddns. 2013111213 10800 3600 1209600 7200") verify(master, zone, dnssec) + # add SOA with different TTL + check_log("SOA different TTL") + up = master.update(zone) + up.add("ddns.", 1800, "SOA", + "dns1.ddns. hostmaster.ddns. 2014111213 10800 1800 1209600 7200") + up.send("NOERROR") + resp = master.dig("ddns.", "SOA") + resp.check(rcode="NOERROR", + rdata="dns1.ddns. hostmaster.ddns. 2014111213 10800 1800 1209600 7200") + verify(master, zone, dnssec) + # add and remove the same record check_log("Add and remove same record") up = master.update(zone)