From de183940a2de6f9041f1ede5f61772c4b5ffb3fb Mon Sep 17 00:00:00 2001 From: kloczek Date: Mon, 6 Mar 2000 14:34:09 +0000 Subject: [PATCH] - fix TTL (patch from ISC). Changed files: bind-ttl.patch -> 1.1 --- bind-ttl.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 bind-ttl.patch diff --git a/bind-ttl.patch b/bind-ttl.patch new file mode 100644 index 0000000..4729705 --- /dev/null +++ b/bind-ttl.patch @@ -0,0 +1,56 @@ +--- bind-8.2.2_P5/src/bin/named/db_load.c.ttl Mon Feb 28 00:47:21 2000 ++++ bind-8.2.2_P5/src/bin/named/db_load.c Mon Feb 28 00:50:13 2000 +@@ -292,6 +292,7 @@ + default_warn = 1; + clev = nlabels(in_origin); + filenames = NULL; ++ zp->z_minimum = USE_MINIMUM; + } + ttl = default_ttl; + +@@ -742,7 +743,7 @@ + zp->z_minimum = 0; + } else + zp->z_minimum = n; +- if (default_ttl == USE_MINIMUM) ++ if (ttl == USE_MINIMUM) + ttl = n; + n = cp - (char *)data; + if (multiline) { +@@ -750,6 +751,7 @@ + buf[1] = '\0'; + if (buf[0] != ')') + ERRTO("SOA \")\""); ++ multiline = 0; + endline(fp); + } + read_soa++; +@@ -971,11 +973,14 @@ + case ns_t_cert: + case ns_t_sig: { + char *errmsg = NULL; +- int ret = parse_sec_rdata(buf, sizeof(buf), 0, +- data, sizeof(data), +- fp, zp, domain, ttl, +- type, domain_ctx, +- transport, &errmsg); ++ int ret; ++ if (ttl == USE_MINIMUM) /* no ttl set */ ++ ttl = 0; ++ ret = parse_sec_rdata(buf, sizeof(buf), 0, ++ data, sizeof(data), ++ fp, zp, domain, ttl, ++ type, domain_ctx, ++ transport, &errmsg); + if (ret < 0) { + errtype = errmsg; + goto err; +@@ -1022,6 +1027,8 @@ + zp->z_origin); + continue; + } ++ if (ttl == USE_MINIMUM) /* no ttl set */ ++ ttl = 0; + dp = savedata(class, type, (u_int32_t)ttl, + (u_char *)data, (int)n); + dp->d_zone = zp - zones; -- 2.44.0