Bug 9820 - Slave server uses wrong TTL value on SOA record
Slave server uses wrong TTL value on SOA record
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: bind (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-02-27 18:26 EST by richards
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-28 10:28:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description richards 2000-02-27 18:26:18 EST
BIND uses the SOA minimum instead of the record's explicit TTL on the SOA
record on the slave server.  This will prevent (for example), an attempt to
delegate an IN-ADDR.ARPA. zone from APNIC, as the SOA records will not
match on master and slave.  Patch supplied by Mark Andrews of the ISC
(works against 8.2.2P3 and 8.2.2P5, pity about the line wrapping in the web
form):

diff -u -r8.98 db_load.c
--- src/bin/named/db_load.c     2000/02/21 21:27:41     8.98
+++ src/bin/named/db_load.c     2000/02/25 04:26:41
@@ -294,6 +294,7 @@
                default_warn = 1;
                clev = nlabels(in_origin);
                filenames = NULL;
+               zp->z_minimum = USE_MINIMUM;
        }
        ttl = default_ttl;

@@ -744,7 +746,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) {
@@ -752,6 +754,7 @@
                                        buf[1] = '\0';
                                        if (buf[0] != ')')
                                                ERRTO("SOA \")\"");
+                                       multiline = 0;
                                        endline(fp);
                                }
                                 read_soa++;
@@ -973,7 +981,10 @@
                        case ns_t_cert:
                        case ns_t_sig: {
                                char *errmsg = NULL;
-                               int ret = parse_sec_rdata(buf, sizeof(buf),
0,
+                               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,
@@ -1024,6 +1035,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;
Comment 1 Bernhard Rosenkraenzer 2000-02-28 10:28:59 EST
Thanks, fixed.

Note You need to log in before you can comment on or make changes to this bug.