diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2018-07-02 14:40:58 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2018-08-14 10:36:10 +0200 |
commit | b00ee5fa8f6fddffce3dedc2d3eaa7990643eb21 (patch) | |
tree | b001276ae2cc3312c6f9f145c99250f383bf6472 /lib/zonecut.c | |
parent | lib/utils: naive refactoring of kr_dname_lf() (diff) | |
download | knot-resolver-b00ee5fa8f6fddffce3dedc2d3eaa7990643eb21.tar.xz knot-resolver-b00ee5fa8f6fddffce3dedc2d3eaa7990643eb21.zip |
TTL changes: moved in libknot from rdata to rrset
To work on RRSIG TTLs, libknot >= 2.7.1 is needed.
Diffstat (limited to 'lib/zonecut.c')
-rw-r--r-- | lib/zonecut.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/zonecut.c b/lib/zonecut.c index ae8425f5..d578132a 100644 --- a/lib/zonecut.c +++ b/lib/zonecut.c @@ -298,8 +298,9 @@ static void fetch_addr(struct kr_zonecut *cut, struct kr_cache *cache, } knot_rrset_t cached_rr; - knot_rrset_init(&cached_rr, /*const-cast*/(knot_dname_t *)ns, rrtype, KNOT_CLASS_IN); - if (kr_cache_materialize(&cached_rr.rrs, &peek, new_ttl, cut->pool) < 0) { + knot_rrset_init(&cached_rr, /*const-cast*/(knot_dname_t *)ns, rrtype, + KNOT_CLASS_IN, new_ttl); + if (kr_cache_materialize(&cached_rr.rrs, &peek, cut->pool) < 0) { return; } knot_rdata_t *rd = cached_rr.rrs.data; @@ -331,7 +332,7 @@ static int fetch_ns(struct kr_context *ctx, struct kr_zonecut *cut, } /* Materialize the rdataset temporarily, for simplicity. */ knot_rdataset_t ns_rds = { 0, NULL }; - ret = kr_cache_materialize(&ns_rds, &peek, new_ttl, cut->pool); + ret = kr_cache_materialize(&ns_rds, &peek, cut->pool); if (ret < 0) { return ret; } @@ -393,8 +394,9 @@ static int fetch_secure_rrset(knot_rrset_t **rr, struct kr_cache *cache, *rr = NULL; return kr_error(ENOMEM); } - knot_rrset_init(*rr, /*const-cast*/(knot_dname_t *)owner, type, KNOT_CLASS_IN); - ret = kr_cache_materialize(&(*rr)->rrs, &peek, new_ttl, pool); + knot_rrset_init(*rr, /*const-cast*/(knot_dname_t *)owner, type, + KNOT_CLASS_IN, new_ttl); + ret = kr_cache_materialize(&(*rr)->rrs, &peek, pool); if (ret < 0) { knot_rrset_free(rr, pool); return ret; |