Commit Diff
Diff:
2ffb795f71e763e7f37a867c5e3869678516207f
d63dfc1198f6f8883501a82dffcde707a88b7c1c
Commit:
d63dfc1198f6f8883501a82dffcde707a88b7c1c
Tree:
2f5322da9bec02bd0822b76a30f70dbb3e5731da
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Mon Nov 4 12:38:40 2019 UTC
Message:
remove a dns_label()/free() dance now that we have a machine readable rzone->zone/rzone->zonelen.
blob - dc0ecd0ebff8ab038fbd71157761b1464cf7a51c
blob + 77425ff4ed85060cec8638bf8db97dc41f9b4b74
--- raxfr.c
+++ raxfr.c
@@ -26,7 +26,7 @@
*
*/
/*
- * $Id: raxfr.c,v 1.25 2019/11/04 12:10:49 pjp Exp $
+ * $Id: raxfr.c,v 1.26 2019/11/04 12:38:40 pjp Exp $
*/
#include <sys/types.h>
@@ -1253,10 +1253,9 @@ replicantloop(ddDB *db, struct imsgbuf *ibuf, struct i
{
struct rzone *lrz, *lrz0;
time_t now, lastnow;
- int apexlen, sel, endspurt = 0;
+ int sel, endspurt = 0;
int idata;
int64_t serial;
- char *apex;
struct rbtree *rbt;
struct rrset *rrset;
struct rr *rrp;
@@ -1284,13 +1283,7 @@ replicantloop(ddDB *db, struct imsgbuf *ibuf, struct i
continue;
dolog(LOG_INFO, "adding SOA values to zone %s\n", lrz->zonename);
- apex = dns_label(lrz->zonename, &apexlen);
- if (apex == NULL) {
- dolog(LOG_INFO, "dns_label failed\n");
- continue;
- }
-
- rbt = find_rrset(db, apex, apexlen);
+ rbt = find_rrset(db, lrz->zone, lrz->zonelen);
if (rbt == NULL) {
dolog(LOG_INFO, "%s has no apex, removing zone from replicant engine\n", lrz->zonename);
SLIST_REMOVE(&rzones, lrz, rzone, rzone_entry);
@@ -1322,7 +1315,6 @@ replicantloop(ddDB *db, struct imsgbuf *ibuf, struct i
now = time(NULL);
schedule_refresh(lrz->zonename, now + lrz->soa.refresh);
free(rbt);
- free(apex);
}
for (;;) {
repomaster@centroid.eu